Chef mysql opscode-cookbooks desn't work: “could not find recipe ruby for cookbook mysql”

不羁岁月 提交于 2019-12-09 17:58:35

问题


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?


回答1:


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.




回答2:


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




回答3:


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



来源:https://stackoverflow.com/questions/23241531/chef-mysql-opscode-cookbooks-desnt-work-could-not-find-recipe-ruby-for-cookbo

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!