Hard to say without seeing more of your code, but my first guess is
that you need to setup Chef::Config and make sure the :cookbook_path
config option is set.
If you're just doing `require 'chef'` you should get Chef::Config
loaded so you could just do Chef::Config[:cookbook_path] =
'/your/cookbook/path' before running CookbookLoader#load_cookbooks.
On Wed, Feb 17, 2010 at 6:29 AM,
I'm trying to develop a application that uses Chef for deploying Software.
Because of that, I need to get all available cookbooks. I found the
CookbookLoader-class but it seems that it doesn't work.
When I try
c_list = Chef::CookbookLoader.new
I can't access any cookbook. Trying to get the apache2 cookbook I get the
`': Cannot find a cookbook named apache2; did you forget to add metadata to
cookbook? (http://wiki.opscode.com/display/chef/Metadata) (ArgumentError)
but I have no idea why it isn't working.
Archive powered by MHonArc 2.6.16.