2016-03-05 68 views
0

kitchen verify命令會在windows平臺上拋出以下錯誤。我不知道哪個gem開始調試來解決這個問題。安裝busser-serverspec插件在test-kitchen上出現錯誤windows上的錯誤

我的Windows主機上安裝寶石: kitchen-pester (0.4.0) kitchen-salt (0.0.22) kitchen-vagrant (0.19.0) test-kitchen (1.5.0) winrm (1.6.0) winrm-s (0.3.4) winrm-transport (1.0.3)

C:\kitchen-salt-tutorial\beaver-formula>kitchen verify default 
-----> Starting Kitchen (v1.5.0) 
-----> Verifying <default-windows-2012r2>... 
     Preparing files for transfer 
     Installing Busser plugins: busser-serverspec 

$$$$$$ &amp; : The term 'C:\opscode\chef\embedded\bin\ruby.exe' is not recognized as the 
$$$$$$ name of a cmdlet, function, script file, or operable program. Check the 
$$$$$$ spelling of the name, or if a path was included, verify that the path is 
$$$$$$ correct and try again. 
$$$$$$ At line:13 char:8 
$$$$$$ + if ((&amp; "$ruby" "$gem" list busser -i) -ne "true") { 
$$$$$$ +  ~~~~~~~ 
$$$$$$  + CategoryInfo   : ObjectNotFound: (C:\opscode\chef\embedded\bin\ru 
$$$$$$ by.exe:String) [], CommandNotFoundException 
$$$$$$  + FullyQualifiedErrorId : CommandNotFoundException 
$$$$$$ 
$$$$$$ &amp; : The term 'C:\opscode\chef\embedded\bin\ruby.exe' is not recognized as the 
$$$$$$ name of a cmdlet, function, script file, or operable program. Check the 
$$$$$$ spelling of the name, or if a path was included, verify that the path is 
$$$$$$ correct and try again. 
$$$$$$ At line:21 char:19 
$$$$$$ + $gem_bindir = &amp; "$ruby" -rrubygems -e "puts Gem.bindir.dup.gsub('/', '\\')" 
$$$$$$ +     ~~~~~~~ 
$$$$$$  + CategoryInfo   : ObjectNotFound: (C:\opscode\chef\embedded\bin\ru 
$$$$$$ by.exe:String) [], CommandNotFoundException 
$$$$$$  + FullyQualifiedErrorId : CommandNotFoundException 
$$$$$$ 
$$$$$$ &amp; : The term 'C:\opscode\chef\embedded\bin\ruby.exe' is not recognized as the 
$$$$$$ name of a cmdlet, function, script file, or operable program. Check the 
$$$$$$ spelling of the name, or if a path was included, verify that the path is 
$$$$$$ correct and try again. 
$$$$$$ At line:22 char:5 
$$$$$$ + &amp; "$ruby" "$gem_bindir\busser" setup --type bat 2&gt;&amp;1 
$$$$$$ +  ~~~~~~~ 
$$$$$$  + CategoryInfo   : ObjectNotFound: (C:\opscode\chef\embedded\bin\ru 
$$$$$$ by.exe:String) [], CommandNotFoundException 
$$$$$$  + FullyQualifiedErrorId : CommandNotFoundException 
$$$$$$ 
$$$$$$ &amp; : The term 'C:\Users\vagrant\AppData\Local\Temp\verifier\bin\busser.bat' is 
$$$$$$ not recognized as the name of a cmdlet, function, script file, or operable 
$$$$$$ program. Check the spelling of the name, or if a path was included, verify 
$$$$$$ that the path is correct and try again. 
$$$$$$ At line:26 char:3 
$$$$$$ + &amp; "$busser" plugin install $plugins.Split() 2&gt;&amp;1 
$$$$$$ + ~~~~~~~~~ 
$$$$$$  + CategoryInfo   : ObjectNotFound: (C:\Users\vagran...\bin\busser.b 
$$$$$$ at:String) [], CommandNotFoundException 
$$$$$$  + FullyQualifiedErrorId : CommandNotFoundException 
>>>>>> Verify failed on instance <default-windows-2012r2>. 
>>>>>> Please see .kitchen/logs/default-windows-2012r2.log for more details 
>>>>>> ------Exception------- 
>>>>>> Class: Kitchen::ActionFailed 
>>>>>> Message: WinRM exited (1) for command: [ 
$env:BUSSER_ROOT = "$env:TEMP\verifier" 
$env:GEM_HOME = "$env:TEMP\verifier\gems" 
$env:GEM_PATH = "$env:TEMP\verifier\gems" 
$env:GEM_CACHE = "$env:TEMP\verifier\gems\cache" 
$ruby = "$env:systemdrive\opscode\chef\embedded\bin\ruby.exe" 
$gem = "$env:systemdrive\opscode\chef\embedded\bin\gem" 
$version = "busser" 
$gem_install_args = "busser --no-rdoc --no-ri --no-format-executable -n $env:TEMP\verifier\bin --no-user-install" 
$busser = "$env:TEMP\verifier\bin\busser.bat" 
$plugins = "busser-serverspec"` 

回答

0

這是由試圖收斂過程中安裝chefdk,而不是廚師的客戶端造成的。 chef_omnibus_url的選項記錄here解釋說它不是綜合安裝程序,而是廚師客戶端。

  • ChefDK路徑 - C:\opscode\chefdk\embedded\bin\ruby.exe
  • 廚師客戶端路徑 - C:\opscode\chef\embedded\bin\ruby.exe