我想使用https://github.com/opscode-cookbooks/mysql 但是当我运行流浪汉时
无法找到食谱mysql的食谱红宝石,它会像这样返回。
[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
但是当我在recipe[crossplat::default]
中添加run_list
并运行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
我该如何解决?
答案 0 :(得分:3)
只有一个mysql cookbook的大型重构,不再需要这个配方。您可以在cookbook's README。
中查看更新后的用法答案 1 :(得分:2)
cookbooks / mysql / recipes / default.rb不适用于mysql cookbook,你需要更新运行列表" recipe [mysql :: server]"或"食谱[mysql :: client]"
答案 2 :(得分:0)
我在另一本食谱上遇到了类似的错误:
FATAL: Chef::Exceptions::RecipeNotFound: could not find recipe my_recipe for cookbook my_cookbook
这是因为我在某个时刻从cookbook下删除了my_recipe.rb并且客户端仍在某处引用它。 简单的解决方案是重新添加空白食谱文件并重新上传食谱。此博客更详细地描述了问题,可能有更好的解决方案:https://www.rallydev.com/community/engineering/chef-dependency-solving