Ruby 无法执行刀CLI

Ruby 无法执行刀CLI,ruby,chef-infra,rvm,centos6,knife,Ruby,Chef Infra,Rvm,Centos6,Knife,有人能给我一个不能执行刀的理由吗 以下是我在尝试执行刀时的错误: # knife /usr/local/rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- chef/knife/core/subcommand_loader (LoadError) from /usr/local/rvm/rubies/ruby

有人能给我一个不能执行刀的理由吗

以下是我在尝试执行刀时的错误:

# knife
/usr/local/rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- chef/knife/core/subcommand_loader (LoadError)
from /usr/local/rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p327/gems/chef-11.8.0/lib/chef/knife.rb:26:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /usr/local/rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p327/gems/chef-11.8.0/lib/chef/application/knife.rb:18:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /usr/local/rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p327/gems/chef-11.8.0/bin/knife:23:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p327/bin/knife:19:in `load'
from /usr/local/rvm/gems/ruby-1.9.3-p327/bin/knife:19:in `<main>'
from /usr/local/rvm/gems/ruby-1.9.3-p327/bin/ruby_executable_hooks:15:in `eval'
from /usr/local/rvm/gems/ruby-1.9.3-p327/bin/ruby_executable_hooks:15:in `<main>'
另一个:

# rvm env
export PATH="/usr/local/rvm/gems/ruby-1.9.3-                                             p327/bin:/usr/local/rvm/gems/ruby-1.9.3-        p327@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p327/bin:$PATH"
export GEM_HOME='/usr/local/rvm/gems/ruby-1.9.3-p327'
export GEM_PATH='/usr/local/rvm/gems/ruby-1.9.3-         p327:/usr/local/rvm/gems/ruby-1.9.3-p327@global'
export MY_RUBY_HOME='/usr/local/rvm/rubies/ruby-1.9.3-p327'
export IRBRC='/usr/local/rvm/rubies/ruby-1.9.3-p327/.irbrc'
unset MAGLEV_HOME
unset RBXOPT
export RUBY_VERSION='ruby-1.9.3-p327'

使用。不建议在其他Ruby环境中使用
knife
。我认为它与Ruby 1.x尤其不兼容。

使用。不建议在其他Ruby环境中使用
knife
。我认为它与Ruby 1.x尤其不兼容。

这是正确的,我们现在需要2.2或更高版本。ChefDK目前在所有平台上都使用2.3.1。这是正确的,目前我们需要2.2或更高版本。ChefDK目前在所有平台上都使用2.3.1。
# rvm env
export PATH="/usr/local/rvm/gems/ruby-1.9.3-                                             p327/bin:/usr/local/rvm/gems/ruby-1.9.3-        p327@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p327/bin:$PATH"
export GEM_HOME='/usr/local/rvm/gems/ruby-1.9.3-p327'
export GEM_PATH='/usr/local/rvm/gems/ruby-1.9.3-         p327:/usr/local/rvm/gems/ruby-1.9.3-p327@global'
export MY_RUBY_HOME='/usr/local/rvm/rubies/ruby-1.9.3-p327'
export IRBRC='/usr/local/rvm/rubies/ruby-1.9.3-p327/.irbrc'
unset MAGLEV_HOME
unset RBXOPT
export RUBY_VERSION='ruby-1.9.3-p327'