Debian Chef服务器>异常:NoMethodError:运行“刀配置-i”时的未定义方法“save”

Debian Chef服务器>异常:NoMethodError:运行“刀配置-i”时的未定义方法“save”,debian,chef-infra,knife,Debian,Chef Infra,Knife,不确定这个问题是否得到解决,或者我是否做错了什么。查看了当前的票证,没有看到相同的错误 我遵循Opscode wiki提供的“使用软件包在Debian或Ubuntu上安装Chef Server”的安装指南,如下所示: 在我到达“配置命令行客户端”一节之前,安装似乎进展顺利。我从我的用户主目录运行了'knife configure-I',并输入了以下内容: admin@chef:~$ knife configure -i Overwrite /home/admin/.chef/knife.rb?

不确定这个问题是否得到解决,或者我是否做错了什么。查看了当前的票证,没有看到相同的错误

我遵循Opscode wiki提供的“使用软件包在Debian或Ubuntu上安装Chef Server”的安装指南,如下所示:

在我到达“配置命令行客户端”一节之前,安装似乎进展顺利。我从我的用户主目录运行了'knife configure-I',并输入了以下内容:

admin@chef:~$ knife configure -i
Overwrite /home/admin/.chef/knife.rb? (Y/N) y
Please enter the chef server URL: http://chef.website.org:4000
Please enter a clientname for the new client: [admin]
Please enter the existing admin clientname: [chef-webui]
Please enter the location of the existing admin client's private key: [/etc/chef/webui.pem] .chef/webui.pem
Please enter the validation clientname: [chef-validator]
Please enter the location of the validation key: [/etc/chef/validation.pem] .chef/validation.pem
Please enter the path to a chef repository (or leave blank):
…我收到以下错误:

Creating initial API user...
ERROR: knife encountered an unexpected error
This may be a bug in the 'configure' knife command or plugin
Please collect the output of this command with the `-VV` option before filing a bug report.
Exception: NoMethodError: undefined method `save' for #<Hash:0x7f9b5d518d08>
在运行'knife configure-i'时,-VV选项似乎与-i选项不起作用

当我使用-VV命令运行教程中的下一个命令时,我收到:

admin@chef:~$ knife client list -VV
DEBUG: Using configuration from /home/admin/.chef/knife.rb
WARN: Failed to read the private key /home/admin/.chef/admin.pem: #<Errno::ENOENT: No such file or directory - /home/admin/.chef/admin.pem>
/usr/lib/ruby/vendor_ruby/chef/rest/auth_credentials.rb:64:in `load_signing_key': I cannot read /home/admin/.chef/admin.pem, which you told me to use to sign requests! (Chef::Exceptions::PrivateKeyMissing)
from /usr/lib/ruby/vendor_ruby/chef/rest/auth_credentials.rb:34:in `initialize'
from /usr/lib/ruby/vendor_ruby/chef/rest.rb:64:in `new'
from /usr/lib/ruby/vendor_ruby/chef/rest.rb:64:in `initialize'
from /usr/lib/ruby/vendor_ruby/chef/api_client.rb:198:in `new'
from /usr/lib/ruby/vendor_ruby/chef/api_client.rb:198:in `list'
from /usr/lib/ruby/vendor_ruby/chef/knife/client_list.rb:38:in `run'
from /usr/lib/ruby/vendor_ruby/chef/knife.rb:408:in `run_with_pretty_exceptions'
from /usr/lib/ruby/vendor_ruby/chef/knife.rb:168:in `run'
from /usr/lib/ruby/vendor_ruby/chef/application/knife.rb:123:in `run'
from /usr/bin/knife:24
我猜这是因为我拒绝逃跑。
我做错了什么?我遗漏了什么?

这是因为ruby json包中与安全相关的更改。看看: