Поваренная книга шеф-повара завершилась неудачно из-за неизвестного метода `[] 'для nil: NilClass

я работаю над поваренной книгой шеф-повара, чтобы настроить vanilla Ubuntu 12.04.2 с помощью nginx postgresql и единорога на моей бродячей коробке, но яу меня проблемы с nginx,исключение

undefined method `[]' for nil:NilClass

при установке, которые, кажется, относятся к конфигурации ohai.I '

Выложил все, что у меня есть здесь:

https://github.com/DonGiulio/mychef

Вот'Выходные данные Chef-Solo:

Starting Chef Client, version 11.4.0
Compiling Cookbooks...

================================================================================
Recipe Compile Error in /var/chef/cookbooks/nginx/recipes/source.rb
================================================================================


NoMethodError
-------------
undefined method `[]' for nil:NilClass


Cookbook Trace:
---------------
  /var/chef/cookbooks/nginx/recipes/ohai_plugin.rb:27:in `from_file'
  /var/chef/cookbooks/nginx/recipes/source.rb:42:in `from_file'


Relevant File Content:
----------------------
/var/chef/cookbooks/nginx/recipes/ohai_plugin.rb:

 20:  #
 21:  
 22:  ohai 'reload_nginx' do
 23:    plugin 'nginx'
 24:    action :nothing
 25:  end
 26:  
 27>> template "#{node['ohai']['plugin_path']}/nginx.rb" do
 28:    source 'plugins/nginx.rb.erb'
 29:    owner  'root'
 30:    group  'root'
 31:    mode   '0755'
 32:    notifies :reload, 'ohai[reload_nginx]', :immediately
 33:  end
 34:  
 35:  include_recipe 'ohai::default'
 36:  


[2013-11-19T14:22:23+00:00] ERROR: Running exception handlers
[2013-11-19T14:22:23+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated
[2013-11-19T14:22:23+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2013-11-19T14:22:23+00:00] FATAL: NoMethodError: undefined method `[]' for nil:NilClass

и здесь's трассировка стека:

$ cat /var/chef/cache/chef-stacktrace.out
Generated at 2013-11-19 14:22:23 +0000
NoMethodError: undefined method `[]' for nil:NilClass
/var/chef/cookbooks/nginx/recipes/ohai_plugin.rb:27:in `from_file'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/mixin/from_file.rb:30:in `instance_eval'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/mixin/from_file.rb:30:in `from_file'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/cookbook_version.rb:346:in `load_recipe'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/run_context.rb:151:in `load_recipe'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/run_context.rb:132:in `block in include_recipe'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/run_context.rb:131:in `each'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/run_context.rb:131:in `include_recipe'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/dsl/include_recipe.rb:26:in `include_recipe'
/var/chef/cookbooks/nginx/recipes/source.rb:42:in `from_file'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/mixin/from_file.rb:30:in `instance_eval'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/mixin/from_file.rb:30:in `from_file'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/cookbook_version.rb:346:in `load_recipe'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/run_context.rb:151:in `load_recipe'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/run_context/cookbook_compiler.rb:139:in `block in compile_recipes'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/run_context/cookbook_compiler.rb:137:in `each'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/run_context/cookbook_compiler.rb:137:in `compile_recipes'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/run_context/cookbook_compiler.rb:74:in `compile'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/run_context.rb:86:in `load'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/client.rb:224:in `setup_run_context'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/client.rb:467:in `do_run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/client.rb:200:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/application.rb:190:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/application/solo.rb:239:in `block in run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/application/solo.rb:231:in `loop'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/application/solo.rb:231:in `run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/application.rb:73:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/bin/chef-solo:25:in `'
/usr/bin/chef-solo:23:in `load'
/usr/bin/chef-solo:23:in `'

ОБНОВЛЕНИЕ 1 Ям поставляя коробку сruby-2.0.0-p247, есть ли зависимость от более ранней версии ruby?

ОБНОВЛЕНИЕ 2 I 'мы пробовали сruby-1.9.3-p448На свежеприготовленной коробке та же проблема, без изменений.

Не могли бы вы мне помочь?

Спасибо,

Ответы на вопрос(4)

Ваш ответ на вопрос