我正在尝试在cookbook中安装chefspec(4.6.1)和fauxhai(3.2.0)。我正面临以下问题" 无法找到有效的宝石' fauxhai' (〜> 3.2)在任何存储库中"。我已经在其他食谱中安装了chefspec4.4.0和fauxhai2.3.0。请帮我解决以下问题。
> [2016-04-18T05:47:59-07:00] ERROR: chef_gem[chefspec] (tc3-chefspec::gem_install line 41) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'
> ---- Begin output of C:/opscode/chef/embedded/bin/gem install C:\chef\cache\chefspec-4.4.0.gem -q --no-rdoc --no-ri -v "4.4.0" --local ----
> STDOUT:
> STDERR: ERROR: Could not find a valid gem 'fauxhai' (~> 2.3) in any repository
> ---- End output of C:/opscode/chef/embedded/bin/gem install C:\chef\cache\chefspec-4.4.0.gem -q --no-rdoc --no-ri -v "4.4.0" --local ----
> Ran C:/opscode/chef/embedded/bin/gem install C:\chef\cache\chefspec-4.4.0.gem -q --no-rdoc --no-ri -v "4.4.0" --local returned 2; ignore_failure is set, continuing
> [2016-04-18T05:47:59-07:00] INFO: Processing log[end tc3-chefspec::gem_install] action write (tc3-chefspec::gem_install line 54)
> [2016-04-18T05:47:59-07:00] INFO: end tc3-chefspec::gem_install
> [2016-04-18T05:47:59-07:00] INFO: Chef Run complete in 16.51561 seconds
> [2016-04-18T05:48:00-07:00] INFO: Running report handlers
> [2016-04-18T05:48:00-07:00] INFO: Report handlers complete
答案 0 :(得分:0)
您似乎正在安装chefspec 4.4.0,而不是4.6.1。请发布您的食谱代码或修复您的使用情况。你也为什么要这样做? Chefspec包含在ChefDK安装程序中,您应该如何安装它。