2016-11-21 160 views
4

錯誤說cannot allocate memory但大量的谷歌搜索顯示本地寶石麻煩了豆莖。Rails elastic 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可以安裝這個gem沒有問題?

回答

0

讓構建系統打包所有的依賴關係佔用比默認EC2實例可以處理的更多的資源。

在ElasticBeanstalk部署期間增加EC2實例/交換文件的大小以解決此問題。

檢查我以前的回覆here

相關問題