Rails Vagrant,Ubuntu 下 执行 bundle install 出错!原来在 Ubuntu 下也没用这样的错误!

shangrenzhidao · 发布于 2013年11月12日 · 最后由 leopku 回复于 2013年11月12日 · 1767 次阅读
8805
root@vagrant-ubuntu-raring-64:/home/vagrant/eol-master# gem install bundler
Successfully installed bundler-1.3.5
1 gem installed
root@vagrant-ubuntu-raring-64:/home/vagrant/eol-master# bundle install
Fetching source index from https://rubygems.org/
Fetching git://github.com/pleary/octopus.git
Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
/usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/gems/bundler-1.3.5/lib/bundler/source/git/git_proxy.rb:88:in ``': Cannot allocate memory - git clone 'git://github.com/pleary/octopus.git' "/usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/cache/bundler/git/octopus-9c72404373193704ea6fac9249dbb7dac8a5cbf7" --bare --no-hardlinks (Errno::ENOMEM)
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/gems/bundler-1.3.5/lib/bundler/source/git/git_proxy.rb:88:in `git'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/gems/bundler-1.3.5/lib/bundler/source/git/git_proxy.rb:49:in `checkout'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/gems/bundler-1.3.5/lib/bundler/source/git.rb:144:in `specs'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/gems/bundler-1.3.5/lib/bundler/lazy_specification.rb:52:in `__materialize__'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/gems/bundler-1.3.5/lib/bundler/spec_set.rb:88:in `block in materialize'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `map!'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `materialize'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in `specs'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/gems/bundler-1.3.5/lib/bundler/definition.rb:109:in `resolve_remotely!'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/gems/bundler-1.3.5/lib/bundler/installer.rb:83:in `run'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/gems/bundler-1.3.5/lib/bundler/installer.rb:14:in `install'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/gems/bundler-1.3.5/lib/bundler/cli.rb:247:in `install'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/gems/bundler-1.3.5/lib/bundler/vendor/thor/task.rb:27:in `run'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/gems/bundler-1.3.5/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/gems/bundler-1.3.5/lib/bundler/vendor/thor.rb:344:in `dispatch'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/gems/bundler-1.3.5/lib/bundler/vendor/thor/base.rb:434:in `start'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/gems/bundler-1.3.5/bin/bundle:20:in `block in <top (required)>'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/gems/bundler-1.3.5/lib/bundler/friendly_errors.rb:3:in `with_friendly_errors'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/gems/bundler-1.3.5/bin/bundle:20:in `<top (required)>'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/bin/bundle:23:in `load'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/bin/bundle:23:in `<main>'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/bin/ruby_executable_hooks:15:in `eval'
        from /usr/local/rvm/gems/ruby-1.9.3-p392@upgrade/bin/ruby_executable_hooks:15:in `<main>'
共收到 6 条回复
F7b32c

你这个vagrant里都跑了些啥? 貌似内存不够了

3

会不会是 VirtualBox 的 bug ?看不明白,猜测的。

8805

#1楼 @leopku redis, webrick solr, 很大一个项目,eol.org 你看看这个网站,那么我想问你可以直接使用virtualboxi为为虚拟机分配更大内存吗?该如何操作

8805

#2楼 @lgn21st 恩,我是先把源码从git上拿下来,再去安装的

8805

#1楼 @leopku 我可以用vagrant管理已安装完的虚拟系统吗?

F7b32c

#3楼 @shangrenzhidao 可以,两种方法。

  1. 打开Vagrantfile,在config里加上
config.vm.provider :virtualbox do |vb|
    vb.customize ["modifyvm", :id, "--memory", "1024"]
end
  1. 打开VirtualBox管理器,然后怎么设置就简单了。

推荐第1种方法

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册