2016-02-08 37 views
0

在廚師客戶端運行,我看到這個Windows Cookbook編譯錯誤,如下所示。它試圖要求什麼,它無法找到,以及如何解決? 「Windows /錯誤」是紅寶石還是別的?廚師windows cookbook編譯錯誤,無法找到文件窗口/錯誤

================================================================================ 
Recipe Compile Error in c:/chef/cache/cookbooks/windows/libraries/windows_privileged.rb 
================================================================================ 

LoadError 
--------- 
cannot load such file -- windows/error 

Cookbook Trace: 
--------------- 
    c:/chef/cache/cookbooks/windows/libraries/windows_privileged.rb:24:in `<top (required)>' 

Relevant File Content: 
---------------------- 
c:/chef/cache/cookbooks/windows/libraries/windows_privileged.rb: 

17: # distributed under the License is distributed on an "AS IS" BASIS, 
18: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
19: # See the License for the specific language governing permissions and 
20: # limitations under the License. 
21: # 
22: 
23: if RUBY_PLATFORM =~ /mswin|mingw32|windows/ 
24>> require 'windows/error' 
25: require 'windows/registry' 
26: require 'windows/process' 
27: require 'windows/security' 
28: end 
29: 
30: #helpers for Windows API calls that require privilege adjustments 
31: class Chef 
32: class WindowsPrivileged 
33:  if RUBY_PLATFORM =~ /mswin|mingw32|windows/ 


Running handlers: 
[2016-02-08T09:31:54-08:00] ERROR: Running exception handlers 
Running handlers complete 
[2016-02-08T09:31:54-08:00] ERROR: Exception handlers complete 
Chef Client failed. 0 resources updated in 01 minutes 44 seconds 
+0

廚師正在使用什麼版本?這個版本的windows cookbook可能太舊了。 – coderanger

回答

2

在朋友的幫助下找到解決方案。

廚師的客戶端版本> 12.5將需要安裝一個寶石

寶石安裝windows-PR

爲了找到這一解決方案,請訪問食譜GitHub庫,並在「問題搜索「 那裏。這是直接鏈接的方法: https://github.com/chef-cookbooks/windows/issues/276