2016-03-30 126 views
0

我有2本地食谱。一个叫做golang_app,另一个叫test_go_web_apptest_go_web_app取决于golang_app并做include_recipe 'golang_app::default'运行golang_app::defaultdefault.rb ....厨师:厨房Converge无法找到当地食谱依赖

我想补充golang_apptest_go_web_app的依赖......眼下,test_go_web_app的Berksfile样子:

source 'https://supermarket.chef.io' 

cookbook 'golang_app', path: '../golang_app' 

metadata 

但是,在运行时kitchen converge,我得到:

Chef::Exceptions::CookbookNotFound 
    ---------------------------------- 
    Cookbook golang_app not found. If you're loading golang_app from another cookbook, make sure you configure the dependency in your metadata 

    Cookbook Trace: 
    --------------- 
    /tmp/kitchen/cache/cookbooks/test_go_web_app/recipes/default.rb:1:in `from_file' 

    Relevant File Content: 
    ---------------------- 
    /tmp/kitchen/cache/cookbooks/test_go_web_app/recipes/default.rb: 

    1>> include_recipe 'golang_app::default' 
    2: 

任何人都已能够得到这个工作?

回答

3

除了Berksfile行之外,还需要将depends 'golang_app'添加到test_go_web_app的metadata.rb。还要确保Berksfile紧邻您的文件夹结构中的Kitchen配置文件。