4

I am trying to run bundle install after I cloned a repository from github to my EC2 instance, but I'm getting the following error:

bundle install
Fetching source index from http://rubygems.org/
Fetching git://github.com/EvilFaeton/rubber.git
Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
/home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/source/git/git_proxy.rb:88:in ``': Cannot allocate memory - git clone 'git://github.com/EvilFaeton/rubber.git' "/home/gbahrani/.rvm/gems/ruby-1.9.2-p320@voylla/cache/bundler/git/rubber-505b2994ade5c531df4a62b99e99b8859d168b37" --bare --no-hardlinks (Errno::ENOMEM)
from /home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/source/git/git_proxy.rb:88:in `git'
from /home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/source/git/git_proxy.rb:49:in `checkout'
from /home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/source/git.rb:144:in `specs'
from /home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/lazy_specification.rb:52:in `__materialize__'
from /home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/spec_set.rb:88:in `block in materialize'
from /home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `map!'
from /home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `materialize'
from /home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in `specs'
from /home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/definition.rb:109:in `resolve_remotely!'
from /home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/installer.rb:83:in `run'
from /home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/installer.rb:14:in `install'
from /home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/cli.rb:247:in `install'
from /home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/vendor/thor/task.rb:27:in `run'
from /home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
from /home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/vendor/thor.rb:344:in `dispatch'
from /home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/vendor/thor/base.rb:434:in `start'
from /home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/bin/bundle:20:in `block in <top (required)>'
from /home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/friendly_errors.rb:3:in `with_friendly_errors'
from /home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/bin/bundle:20:in `<top (required)>'
from /home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/bin/bundle:19:in `load'
from /home/gbahrani/.rvm/gems/ruby-1.9.2-p320@global/bin/bundle:19:in `<main>'

Could someone please tell me why I'm getting this error and how I can fix this? Thanks

3 Answers 3

8

The problem was that the instance was running out of memory. Changing the instance type from t1.micro to m1.small fixed the problem. Downside is that the m1.small instance is chargeable, unlike t1.micro. The instance type can be changed as mentioned here. You may also want to check this

Hope it helps someone.

3

hey a better way to work around this without having to upgrade the instance and for everybody that want to keep using micro they should just add a swap to the instance. There is a very usefull guide here

2

try adding swap to your instance

https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-12-04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.