Elastic Beanstalk容器命令:获取ruby依赖性错误

时间:2014-04-24 19:02:08

标签: amazon-web-services yaml elastic-beanstalk

我是aws的新手,正在学习如何编写容器命令。我在这里找到了一个很好的链接:AWS Elastic Beanstalk using PHP with Private Composer Repositories

一切都在开始。但是,后来,我的弹性光束开始吐出这个错误

Command failed on instance. Return code: 1 Output: Error occurred during build: Defaults script for command 11-move-priv-key failed .

我正在检查我的cfn-init.log,它正在显示

2014-04-24 17:16:33,577 [DEBUG] Running command 11-move-priv-key
2014-04-24 17:16:33,578 [DEBUG] Generating defaults for command 11-move-priv-key
2014-04-24 17:16:33,595 [DEBUG] Defaults script for 11-move-priv-key output: 
2014-04-24 17:16:33,596 [ERROR] Defaults script failed for 11-move-priv-key: /opt/elasticbeanstalk/support/cfncontext.rb:3:in `require': no such file to load -- rubygems (LoadError)
    from /opt/elasticbeanstalk/support/cfncontext.rb:3:in `require': no such file to load -- rubygems (LoadError)
    from /opt/elasticbeanstalk/support/cfncontext.rb:3

所以,没有安装rubygems,并运行yum install ruby​​gems

然后,它表示json没有安装ruby,我决定运行gem install json,我得到了

Building native extensions.  This could take a while...
ERROR:  Error installing json:
    ERROR: Failed to build gem native extension.

    /usr/bin/ruby1.8 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h

我是aws的新手,之前从未使用过红宝石。所以,我有点困惑。

首先,为什么它在之前工作并停止工作?有没有我不小心改变的设置?

其次,如何修复json安装...

提前致谢!

贾斯汀

0 个答案:

没有答案