【发布时间】:2014-10-27 08:56:55
【问题描述】:
我正在使用 eb CLI 在 AWS 上安装我的 rails 应用程序。我之前已经进行了测试,但现在我正在尝试部署我编写的一些实际代码。当我执行 git aws.push 时,更新失败。 “eb logs”命令显示捆绑器失败。
我在运行 Ruby 2.1 (Puma) 的 64 位 Amazon Linux 2014.03 v1.0.0 上运行它
Fetching source index from https://rubygems.org/
Using rake (10.3.2)
Using i18n (0.6.11)
Using minitest (4.7.5)
Using multi_json (1.10.1)
Using thread_safe (0.3.4)
Using tzinfo (0.3.41)
Using activesupport (4.0.8)
Using builder (3.1.4)
Using erubis (2.7.0)
Using rack (1.5.2)
Using rack-test (0.6.2)
Using actionpack (4.0.8)
Using mime-types (1.25.1)
Using polyglot (0.3.5)
Using treetop (1.4.15)
Using mail (2.5.4)
Using actionmailer (4.0.8)
Using activemodel (4.0.8)
Using active_model_serializers (0.9.0)
Using activerecord-deprecated_finders (1.0.3)
Using arel (4.0.2)
Using activerecord (4.0.8)
Using addressable (2.3.6)
Using execjs (2.2.1)
Using autoprefixer-rails (3.0.1.20140826)
Installing bcrypt (3.1.7)
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/opt/rubies/ruby-2.1.2/bin/ruby extconf.rb
Cannot allocate memory - /opt/rubies/ruby-2.1.2/bin/ruby extconf.rb 2>&1
Gem files will remain installed in /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bcrypt-3.1.7 for inspection.
Results logged to /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-linux/2.1.0-static/bcrypt-3.1.7/gem_make.out
An error occurred while installing bcrypt (3.1.7), and Bundler cannot continue.
Make sure that `gem install bcrypt -v '3.1.7'` succeeds before bundling.
2014-09-03 00:22:36,561 [ERROR] (3331 MainThread) [directoryHooksExecutor.py-33] [root directoryHooksExecutor error] Script /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh failed with returncode 5
我也没有在我的 gem 文件中调用 bcrypt。一定是魔法宝石的依赖。
我尝试将“捆绑包”用于供应商/缓存技巧,但它一直说 AWS 上缺少一些宝石。正如你所知道的,我不仅对弹性豆茎/aws而且对rails都很陌生,所以我可能做错了什么。
此外,当我在 gemfile.lock 中删除 bcrypt 引用(我确信这会破坏某些内容)时,它稍后会在不同的 gem 上引发相同的错误 (ffi)。我敢肯定,如果我一次只解决一个 gem 的问题,它最终会抛出错误。
【问题讨论】:
标签: ruby-on-rails amazon-web-services gem bundler amazon-elastic-beanstalk