1

一旦我将aws 食谱添加到我的厨师单独部署中,我就收到了这个错误:

FATAL: NameError: wrong constant name Aws.ElasticIp

这里是堆栈跟踪:

NameError: wrong constant name Aws.ElasticIp
/usr/local/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/provider.rb:89:in `const_defined?'
/usr/local/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/provider.rb:89:in `build_from_file'
/usr/local/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:89:in `block in load_lwrp_providers'
/usr/local/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:120:in `call'
/usr/local/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:120:in `block (2 levels) in foreach_cookbook_load_segment'
/usr/local/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:119:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:119:in `block in foreach_cookbook_load_segment'
/usr/local/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:117:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:117:in `foreach_cookbook_load_segment'
/usr/local/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:87:in `load_lwrp_providers'
/usr/local/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:58:in `load'
/usr/local/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/client.rb:195:in `setup_run_context'
/usr/local/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/client.rb:159:in `run'
/usr/local/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application/solo.rb:192:in `block in run_application'
/usr/local/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application/solo.rb:183:in `loop'
/usr/local/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application/solo.rb:183:in `run_application'
/usr/local/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application.rb:67:in `run'
/usr/local/lib/ruby/gems/1.9.1/gems/chef-0.10.8/bin/chef-solo:25:in `<top (required)>'
/usr/local/bin/chef-solo:19:in `load'
/usr/local/bin/chef-solo:19:in `<main>'

即使我不包括recipe[aws]部署。其他食谱,如 mysql、redis、rvm、数据库工作正常。有任何想法吗?

4

1 回答 1

1

我解决了从上传到服务器的代码中删除隐藏文件(mac os 自动生成的文件)的问题。使用 COPYFILE_DISABLE=true 对文件夹进行焦油处理让我解决问题。

于 2012-05-30T11:18:42.193 回答