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



我正在字符串中使用https://github.com/opscode-cookbooks/mysql但当我经营流浪者供应时

找不到食谱mysql的配方ruby,返回如下。

[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

我发现了这个,然后添加了mysql-chef_gem。https://github.com/opscode-cookbooks/mysql/blob/b5072e6ae3bd81b0f6ebec8749f2c2d781271ed9/COMPAT.md

knife cookbook site vendor mysql-chef_gem -o cookbook

但当我在run_list中添加recipe[crossplat::default]并运行vagrant provision时,它会返回

[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

我该如何解决?

只对mysql食谱进行了一次大型重构,该食谱已不再必要。你可以在食谱的自述中看到更新的用法。

cookbooks/mysql/precipes/default.rb不适用于mysql cookbook,您需要更新运行列表"recipe[mysql::server]"或"recipe[mysql::client]"

我在另一本食谱中遇到了类似的错误:

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

这是因为我在某个时候从食谱下面删除了my_recipe.rb,而客户仍然在某个地方引用它简单的解决方案是重新添加一个空白的食谱文件并重新上传食谱本博客更详细地描述了这个问题,可能有更好的解决方案:https://www.rallydev.com/community/engineering/chef-dependency-solving

最新更新