ruby - no method error for nginx chef recipe -


i'm trying use recipe nginx chef opscode website, http://community.opscode.com/cookbooks/nginx

when run recipe, it's triggering no method error traces line of code source.rb. line 28 referred in trace.

nginx_url = node['nginx']['source']['url'] ||   "http://nginx.org/download/nginx-#{node['nginx']['source']['version']}.tar.gz" 

can explain problem might be? i'm following along railscast http://railscasts.com/episodes/339-chef-solo-basics?view=asciicast recipe (an older version obviously) working ryan.

nomethoderror: undefined method `[]' nil:nilclass /var/chef/cookbooks/nginx/recipes/source.rb:28:in `from_file' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/mixin/from_file.rb:30:in `instance_eval' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/mixin/from_file.rb:30:in `from_file' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/cookbook_version.rb:346:in `load_recipe' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context.rb:151:in `load_recipe' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context.rb:132:in `block in include_recipe' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context.rb:131:in `each' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context.rb:131:in `include_recipe' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/dsl/include_recipe.rb:26:in `include_recipe' /var/chef/cookbooks/main/recipes/default.rb:4:in `from_file' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/mixin/from_file.rb:30:in `instance_eval' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/mixin/from_file.rb:30:in `from_file' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/cookbook_version.rb:346:in `load_recipe' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context.rb:151:in `load_recipe' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/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.4/lib/chef/run_context/cookbook_compiler.rb:137:in `each' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:137:in `compile_recipes' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:74:in `compile' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context.rb:86:in `load' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/client.rb:224:in `setup_run_context' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/client.rb:467:in `do_run' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/client.rb:200:in `run' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application.rb:190:in `run_chef_client' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application/solo.rb:239:in `block in run_application' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application/solo.rb:231:in `loop' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application/solo.rb:231:in `run_application' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application.rb:73:in `run' 

sorry being late party. in case didn't solve before need enter dependency in metadata.rb

like below:

name             'casino-saga' maintainer       'mikael henriksson' license          'all rights reserved' description      'installs/configures casino-saga servers' long_description io.read(file.join(file.dirname(__file__), 'readme.md')) version          '0.1.0'  depends 'apt' depends 'build-essential' depends 'ohai' depends 'runit' depends 'nginx' depends 'rbenv' depends 'postgresql' 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -