我没有安装下面提到的ruby的东西
当我尝试执行厨师客户,我收到下面提到的错误
c:\RubyDevKit>chef-client C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- ruby-wmi (LoadError) from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/provider/env/windows.rb:20:in `<top (required)>' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef/providers.rb:49:in `<top (required)>' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/chef-10.14.4/lib/chef.rb:25:in `<top (required)>' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/chef-10.14.4/bin/chef-client:23:in `<top (required)>' from C:/Ruby193/bin/chef-client:23:in `load' from C:/Ruby193/bin/chef-client:23:in `<main>'
Ruby193文件夹结构(Missing)
错误消息cannot load such file -- ruby-wmi (LoadError)
即将到来,因为chef-client
找不到所需的宝石。
这个问题在常见错误的Opscode / Chef wiki页面上得到解决。
如上所述,使用以下命令安装所需的gem:
C:\> gem install win32-open3 ruby-wmi windows-api windows-pr --no-rdoc --no-ri --verbose C:\> gem install rdp-ruby-wmi
正如Prakash Murthy所说,它缺少ruby-wmi文件。 以为这将有助于如果有人再次卡住
我没有运行这些命令
C:\> gem install win32-open3 ruby-wmi windows-api windows-pr --no-rdoc --no-ri --verbose C:\> gem install rdp-ruby-wmi
还有一个错误
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- win32/service (LoadError)
所以我会推荐
(i)检查安装的宝石(在CMD中)
gem list
这将指出失踪的宝石,在我的情况下win32 /服务misisng
(ii) gem install win32-service
再次检查宝石名单,以确保&应该解决问题。
新版本的厨师不使用红宝石,所以你不应该需要的宝石。 我尝试运行测试厨房时遇到了这个错误,而且我尝试了上面的解决方案,但是他们没有工作。
这对我工作:
之后,厨房运行良好。