6

I'm tring to use https://github.com/opscode-cookbooks/mysql but when I run vagrant provision

could not find recipe ruby for cookbook mysql it returns like this.

[2014-04-23T10:13:06+00:00] ERROR: Running exception handlers
[2014-04-23T10:13:06+00:00] ERROR: Exception handlers complete
[2014-04-23T10:13:06+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2014-04-23T10:13:06+00:00] ERROR: could not find recipe ruby for cookbook mysql

================================================================================
Recipe Compile Error
================================================================================


Chef::Exceptions::RecipeNotFound
--------------------------------
could not find recipe ruby for cookbook mysql

I found this then added mysql-chef_gem. https://github.com/opscode-cookbooks/mysql/blob/b5072e6ae3bd81b0f6ebec8749f2c2d781271ed9/COMPAT.md

knife cookbook site vendor mysql-chef_gem -o cookbook

But when I add recipe[crossplat::default] in run_list, and run vagrant provision it returns

[2014-04-23T10:15:14+00:00] ERROR: Cookbook crossplat not found. If you're loading crossplat from another cookbook, make sure you configure the dependency in your metadata

How can I solve that?

Anshul Goyal
  • 73,278
  • 37
  • 149
  • 186
yuzroz
  • 71
  • 1
  • 2
  • 6

3 Answers3

3

There was just a large refactor of the mysql cookbook and that recipe is no longer necessary. You can see the updated usage in the cookbook's README.

czerasz
  • 13,682
  • 9
  • 53
  • 63
sethvargo
  • 26,739
  • 10
  • 86
  • 156
  • knife cookbook site vendor database -o cookbooks I run this and solved! no need mysql-chef_gem, thank you sethvargo! – yuzroz Apr 23 '14 at 17:32
2

cookbooks/mysql/recipes/default.rb not available for mysql cookbook, you need update the run list "recipe[mysql::server]" or "recipe[mysql::client]"

0

I was getting a similar error for a different cookbook:

FATAL: Chef::Exceptions::RecipeNotFound: could not find recipe my_recipe for cookbook my_cookbook

This resulted when I removed my_recipe.rb from under the cookbook at some point and the client still referencing it somewhere. The simple solution was to re-add a blank recipe file and re-uploading the cookbook. This blog describes the problem in more detail and might have a better solution: https://www.rallydev.com/community/engineering/chef-dependency-solving

AXE Labs
  • 4,051
  • 4
  • 29
  • 29