Skip to main content
nand9lohot

1 week ago

chef generator issue - Local Cookbook Development badge

While generating a cookbook using my generator, the content of kitchen.yml.erb and spec_helper.rb aren't getting pupulated in the cookbbok however the README content get's populated. I'm following the excercise from Local Cookbook Development badge.

Image of kevinpjames
kevinpjames
1 week ago

Hi.  As part of the process for using generators you need to make sure that the ~/.chef/config file has the information about the cookbook path (in the lesson it is ~/chef/cookbooks)

And the information about the location of the chefdk.generator_cookbook.

In the lesson that is the section of the file that contains the
chefdk.generator_cookbook setting.

Have a look and check to make sure you have that in there please.

If you like, feel free to paste a copy of your ~/.chef/config file here and we can have a look.

Image of kevinpjames
kevinpjames
1 week ago

Have a look at the process used for this hands-on lab.  I just validated it works.


https://app.linuxacademy.com/hands-on-labs/9090ac2b-6dda-4ab0-9ec1-bce68953955e?redirect_uri=https:%2F%2Fapp.linuxacademy.com%2Fsearch%3Fquery%3DTest%2520Kitchen