RE : Re: RE : ERROR: Cookbook app_test not found

-------- Message d’origine --------
De : “Flores, Luis Fernando (GE Capital, Non-GE)” LuisFernando.Flores@ge.com
Date : 22/08/2014 0:11 (GMT+01:00)
A : chef@lists.opscode.com
Objet : [chef] Re: RE : ERROR: Cookbook app_test not found

Hello Léonard,

regarding: “VM manager (Virtualbox?) To check how many boxes you have there ?” --There are none, I just ‘vagrant destroy’ them and start a new each time… is it not appropriate?

Well it must take a lot of time to start all over again each time. Maybe you can take a snapshot of a new box through virtualbox and reload this initial state when you need it ?

Luis Fernando Flores
+52 449 9107800 xt: 6241
Av. Eugenio Garza Sada #902
Parque Industrial Tecnopolo
Aguascalientes, Aguascalientes,
Mexico 20328

On Aug 21, 2014, at 4:40 PM, Léonard Messier <leonard.messier@gmail.commailto:leonard.messier@gmail.com>
wrote:

Hi,

I quite sure knife has nothing to do with the provisioning of your vagrant box.
It must be used by test-kitchen when the tests are run but this probably ain’t the same vagrant box than the one that’s fired when you do a “vagrant up”. Have you opened up your VM manager (Virtualbox?) To check how many boxes you have there ?

Actually, there’s a “cookbooks_path” variable that can be used in your Vagrantfile.

Plus, I don’t really understand your project structure. Does app_test contain the usual “templates”, “attributes” etc directories ?
Where is your Vagrantfile located ?

Looks like chef tries to locate your cookbook in the default cookbooks directory coz you didn’t specify any cookbooks path.

Since you seem to do vagrant up inside the cookbook itself, it looks in the wrong place. You should have your Vagrantfile in the chef_repo directory and launch vagrant up from there.

Good luck

-------- Message d’origine --------
De : “Flores, Luis Fernando (GE Capital, Non-GE)” <LuisFernando.Flores@ge.commailto:LuisFernando.Flores@ge.com>
Date : 21/08/2014 22:50 (GMT+01:00)
A : chef@lists.opscode.commailto:chef@lists.opscode.com
Objet : [chef] ERROR: Cookbook app_test not found

Hello master Chefs,

I am testing a cookbook app_test with a Vagrant virtual box VM; when I do ‘vagrant up’ at the cookbook location, I get this message:

[2014-08-21T15:46:42-04:00] ERROR: Cookbook app_test not found. If you’re loading app_test from another cookbook, make sure you configure the dependency in your metadata

I notice that at the start of the run, vagrant sends this message:
[application_box] The cookbook path ‘/Users/luis.flores/chef_repo/cookbooks/app_test/cookbooks’ doesn’t exist. Ignoring…

My knife.rb states the cookbook path as …
cookbook_path “#{ENV[‘HOME’]}/chef_repo” # I have tried with “#{ENV[‘HOME’]}/chef_repo/cookbooks” with same result

As you can see, the last “/cookbooks” is being added in runtime, I have checked my Vagrantfile, metadata.rb and kitchen.yml and none has a cookbook path to add. I don’t know which component is adding that reference, all I know is the ‘knife.rb’ file should specify that value, so… What is happening?

Regards.

Luis Fernando Flores
+52 449 9107800 xt: 6241
Av. Eugenio Garza Sada #902
Parque Industrial Tecnopolo
Aguascalientes, Aguascalientes,
Mexico 20328