Reputation: 20171
Error says cannot allocate memory
but lots of googling has shown native gems are troubling on beanstalk.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/opt/rubies/ruby-2.1.10/bin/ruby extconf.rb
Cannot allocate memory - /opt/rubies/ruby-2.1.10/bin/ruby extconf.rb 2>&1
Gem files will remain installed in /opt/rubies/ruby-2.1.10/lib/ruby/gems/2.1.0/gems/json-1.8.3 for inspection.
Results logged to /opt/rubies/ruby-2.1.10/lib/ruby/gems/2.1.0/extensions/x86_64-linux/2.1.0-static/json-1.8.3/gem_make.out
is there a way to verify beanstalk can install this gem without problems?
Upvotes: 4
Views: 478
Reputation: 87
Letting the build system package all the dependencies take up more resources than the default EC2 instance can handle.
Increase the size of your EC2 instance/ Swapfile during ElasticBeanstalk deployment to fix this issue.
check my previous response here
Upvotes: 0
Reputation: 11
Did you attempt locally package the gems in Beanstalk? https://aws.amazon.com/blogs/devops/locally-packaging-gem-dependencies-for-ruby-applications-in-elastic-beanstalk/
Upvotes: 1