ruby-on-rails – Rails弹性Beanstalk无法部署 –

错误说无法分配内存,但许多谷歌搜索显示本机宝石在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

有没有办法验证beanstalk可以安装这个宝石没有问题?

最佳答案 您是否尝试在Beanstalk中本地打包宝石?
https://aws.amazon.com/blogs/devops/locally-packaging-gem-dependencies-for-ruby-applications-in-elastic-beanstalk/

点赞