2013-05-01 27 views
0

我正嘗試使用knife-essentials將Chef 11服務器中的所有對象備份到json文件。我創建了一個目錄下的「備份」含.chef/download.rb如何使用knife-essentials進行備份廚師11

transfer_repo = File.expand_path('..', File.dirname(__FILE__)) 
chef_server_url "https://localhost" 
node_name 'chef-importer' 
client_key "~/.chef/client.pem" 
repo_mode 'everything' 
versioned_cookbooks true 
chef_repo_path transfer_repo 
cookbook_path nil 

當我嘗試使用「刀下載」我得到這個錯誤:

# /usr/local/rvm/bin/chef_knife download -c .chef/download.rb/
ERROR: TypeError: can't convert nil into String 

這是抱怨cookbook_path,所以我試圖消除這一行,但是這給了我這樣的:

ERROR: File chef is a directory while file chef is a regular file 

什麼是使用刀要領下載廚師11一切正確的方法是什麼?

謝謝

回答

0

檢查您的Ruby版本。我會推薦使用RVM和Ruby 1.9.2版本。 這應該對你有所幫助。