I\'m working on a chef cookbook to set up a vanilla ubuntu 12.04.2 with nginx postgresql and unicorn on my vagrant box, but I\'m getting into troubles with nginx, there\'s a
looks like ruby libraries were missing, I installed ruby by running following command on Ubuntu and it started working for me
apt-get install ruby
Ran into this trying to use community nexus cookbook. Solved it by specifying latest version of nginx cookbook in my metadata.rb:
depends 'nginx', '>= 2.7.6'
The nexus cookbook metadata.rb specifies:
depends "nginx", ">= 1.8.0"
So seems that chef will choose 1.8.0 when resolving deps unless you specify a newer version.
You haven't stated which version of the ohai and nginx cookbooks you're using.
While I can't answer your question I can provide some advice on managing your cookbooks by using a dependency manager (think bundler for cookbooks).
Install Berkshelf
gem install berkshelf
Create a Berkshelf file
$ cat Berksfile
site :opscode
cookbook "nginx"
And use this to download all the cookbooks associated with nginx:
$ berks install -p cookbooks
Using nginx (2.0.0)
Using apt (2.3.0)
Using bluepill (2.3.0)
Using rsyslog (1.9.0)
Using build-essential (1.4.2)
Using ohai (1.1.12)
Using runit (1.2.0)
Using yum (2.3.2)
The "-p" option places them in the "cookbooks" subdirectory:
$ ls -d cookbooks/*
cookbooks/apt
cookbooks/build-essential
cookbooks/ohai
cookbooks/runit
cookbooks/bluepill
cookbooks/nginx
cookbooks/rsyslog
cookbooks/yum
I have experienced the same error. You may find 3 other solutions to this problem, and an explanation why it's happening here on stackoverflow.
To mention one for those using Vagrant: Just include the recipe through Vagrantfile "chef.add_recipe()".
Using Berkshelf is obviously solving the issue, and I honestly like it. Just think that we should save the time of those who doesn't want to bother with installing new tools.