2013-10-14 49 views
0

我在Windows上運行ruby,通過ruby安裝程序安裝了1.9.3。我已經安裝了chef紅寶石,但是我不能在命令行中使用chef-clientknife在Windows上的Ruby:未初始化的常量Process :: Functions :: FFI(NameError)

以下是命令行的刪節輸出。出了什麼問題?

C:\>chef-client 
C:/ruby193/lib/ruby/gems/1.9.1/gems/windows-api-0.4.0/lib/windows/api.rb:4: Use RbConfig instead of obsolete and deprecated Config. 
C:/ruby193/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.2.0/lib/mixlib/shellout/windows/core_ext.rb:31:in `<module:Functions>': 
     uninitialized constant Process::Functions::FFI (NameError) 
     from C:/ruby193/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.2.0/lib/mixlib/shellout/windows/core_ext.rb:30:in `<top (required)>' 
     from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:73:in `require' 
     from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:73:in `require' 
     from C:/ruby193/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.2.0/lib/mixlib/shellout/windows.rb:26:in `<top (required)>' 
     from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:73:in `require' 
     from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:73:in `require' 
     from C:/ruby193/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.2.0/lib/mixlib/shellout.rb:33:in `<class:ShellOut>' 
     from C:/ruby193/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.2.0/lib/mixlib/shellout.rb:26:in `<module:Mixlib>' 
     from C:/ruby193/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.2.0/lib/mixlib/shellout.rb:24:in `<top (required)>' 

P.版本號:

C:\>ruby -v 
ruby 1.9.3p374 (2013-01-15) [i386-mingw32] 

C:\>gem -v 
2.1.8 

回答

1

如果你使用的廚師11.6.2(最新版本),你可能要降級到11.6.0。 11.6.2使用mixlib-shellout,但不幸的是只有1.1,並且FFI依賴的版本非常低。降級到11.6.0應該暫時解決這個問題,他們的主分支現在正在使用mixlib-shellout 1.2,所以它應該很快就會得到解決......

相關問題