Uinstall ruby and reinstall chef-client, chef comes with its own ruby included and it clashes sometimes with system ruby depending on your path values and order.
If you need a system ruby, create wrapper files to cmd which set the correct path for ruby or chef
Envoyé à partir de mon smartphone Sony Xperia™
---- Roberts, Evan a écrit ----
Hello All,I’m considering using Chef to manage our AWS infrastructure. I am trying to set my Windows 7 desktop up as an administration workstation. I’ve installed the client msi a few times but continue to get the same problem, knife –version is giving a dependency error. I’ve given details of my system and the steps I’ve followed below.Any help would be appreciated.ThanksEvan R.My desktop is running:OS Name Microsoft Windows 7 ProfessionalVersion 6.1.7601 Service Pack 1 Build 7601OS Manufacturer Microsoft CorporationSystem Manufacturer Dell Inc.System Model OptiPlex 780System Type x64-based PCProcessor Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz, 3000 Mhz, 2 Core(s), 2 Logical Processor(s)BIOS Version/Date Dell Inc. A12, 12/9/2011SMBIOS Version 2.5Windows Directory C:\WindowsSystem Directory C:\Windows\system32Boot Device \Device\HarddiskVolume1Locale United StatesHardware Abstraction Layer Version = "6.1.7601.17514"Installed Physical Memory (RAM) 4.00 GBTotal Physical Memory 3.87 GBAvailable Physical Memory 1.53 GBTotal Virtual Memory 7.74 GBAvailable Virtual Memory 5.57 GBI’ve installedruby - 2.1.3p242 (2014-09-19 revision 47630) [i386-mingw32]rails - Rails 4.1.6Chef - chef-windows-11.16.2-1.windows.msichef-starter.zip – unzipped it to C:\users\eroberts\chef-repoWhen I start a command window with or without admin rights then:C:\Users\eroberts>cd chef-repoC:\Users\eroberts\chef-repo>knife --versionC:/Ruby21/lib/ruby/2.1.0/rubygems/dependency.rb:298:in `to_specs': Could not find 'chef' (>= 0) among 34 total gem(s) (Gem::LoadError)from C:/Ruby21/lib/ruby/2.1.0/rubygems/dependency.rb:309:in `to_spec'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:53:in `gem'from C:/opscode/chef/bin/knife:22:in `<main>'I thought I missed loading the chef gem, so I ran:C:\Users\eroberts\chef-repo>gem install chef<stuff deleted>And tried again:C:\Users\eroberts\chef-repo>knife --versionC:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- ffi_c (LoadError)from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/gems/2.1.0/gems/ffi-1.9.4-x86-mingw32/lib/ffi.rb:14:in `rescue in <top (required)>'from C:/Ruby21/lib/ruby/gems/2.1.0/gems/ffi-1.9.4-x86-mingw32/lib/ffi.rb:3:in `<top (required)>'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/gems/2.1.0/gems/win32-process-0.7.4/lib/win32/process/functions.rb:6:in `<top (required)>'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/gems/2.1.0/gems/win32-process-0.7.4/lib/win32/process.rb:1:in `<top (required)>'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/gems/2.1.0/gems/mixlib-shellout-1.6.0.rc.0-x86-mingw32/lib/mixlib/shellout/windows.rb:21:in `<top (required)>'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/gems/2.1.0/gems/mixlib-shellout-1.6.0.rc.0-x86-mingw32/lib/mixlib/shellout.rb:33:in `<class:ShellOut>'from C:/Ruby21/lib/ruby/gems/2.1.0/gems/mixlib-shellout-1.6.0.rc.0-x86-mingw32/lib/mixlib/shellout.rb:26:in `<module:Mixlib>'from C:/Ruby21/lib/ruby/gems/2.1.0/gems/mixlib-shellout-1.6.0.rc.0-x86-mingw32/lib/mixlib/shellout.rb:24:in `<top (required)>'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/gems/2.1.0/gems/chef-11.16.2/lib/chef/shell_out.rb:1:in `<top (required)>'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/gems/2.1.0/gems/chef-11.16.2/lib/chef/mixin/shell_out.rb:20:in `<top (required)>'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/gems/2.1.0/gems/chef-11.16.2/lib/chef/util/selinux.rb:23:in `<top (required)>'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/gems/2.1.0/gems/chef-11.16.2/lib/chef/config.rb:25:in `<top (required)>'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/gems/2.1.0/gems/chef-11.16.2/lib/chef/application.rb:21:in `<top (required)>'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/gems/2.1.0/gems/chef-11.16.2/lib/chef/config_fetcher.rb:1:in `<top (required)>'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/gems/2.1.0/gems/chef-11.16.2/lib/chef/knife.rb:23:in `<top (required)>'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/gems/2.1.0/gems/chef-11.16.2/lib/chef/application/knife.rb:18:in `<top (required)>'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'from C:/Ruby21/lib/ruby/gems/2.1.0/gems/chef-11.16.2/bin/knife:23:in `<top (required)>'from C:/Ruby21/bin/knife:23:in `load'from C:/Ruby21/bin/knife:23:in `<main>'C:\Users\eroberts\chef-repo>Evan RobertsOraMetrix2350 Campbell Creek Blvd, Suite 400Richardson, Tx 75082
Archive powered by MHonArc 2.6.16.