2016-03-30 174 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配置文件。