Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have downloaded nginx cookbook manually today from 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'] || "{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?

share|improve this question
First look at the "stack trace" to see if you can determine what the problem was. – Michael Hampton May 7 '13 at 16:31

Try explicitly setting the attributes




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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.