只要我将aws cookbook添加到我的厨师独奏部署中,我就会收到此错误:
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,数据库都正常工作。有什么想法吗?
答案 0 :(得分:1)
我解决了从我上传到服务器的代码中删除隐藏文件(mac os自动生成的文件)的问题。使用COPYFILE_DISABLE = true来定位文件夹让我解决问题。