0

I have downloaded nginx cookbook manually today from http://community.opscode.com/cookbooks/nginx and started it with include_recipe nginx::source, using chef-solo 11.4 on Ubuntu 12.04

But I have got an error

/nginx/recipes/source.rb line: 28

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

and the errors are:

`
[2013-05-07T18:54:38+04:00] ERROR: Running exception handlers
[2013-05-07T18:54:38+04:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated
[2013-05-07T18:54:39+04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2013-05-07T18:54:39+04:00] FATAL: NoMethodError: undefined method `[]' for nil:NilClass
`

How to fix it?

1
  • First look at the "stack trace" to see if you can determine what the problem was. May 7, 2013 at 16:31

1 Answer 1

0

Try explicitly setting the attributes

node["nginx"]["source"]["url"]

and/or

node["nginx"]["source"]["version"]

It seems as if one of those doesn't exist, which is strange, since they're set up with defaults in the cookbook.

If this doesn't help, please respond with as much information as you can. There's usually a bit more detailed info further up the scrollback, as it only displays the error summary at the end.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .