[chef] Re: Setting up Chef client on Windows 7


Chronological Thread 
  • From: Tensibai Zhaoying < >
  • To:
  • Subject: [chef] Re: Setting up Chef client on Windows 7
  • Date: Wed, 24 Sep 2014 17:13:23 +0200

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.
 
Thanks
 
Evan R.
 
My desktop is running:
OS Name         Microsoft Windows 7 Professional
Version                 6.1.7601 Service Pack 1 Build 7601
OS Manufacturer Microsoft Corporation
System Manufacturer     Dell Inc.
System Model            OptiPlex 780
System Type             x64-based PC
Processor               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/2011
SMBIOS Version  2.5
Windows Directory       C:\Windows
System Directory        C:\Windows\system32
Boot Device             \Device\HarddiskVolume1
Locale                  United States
Hardware Abstraction Layer              Version = "6.1.7601.17514"
Installed Physical Memory (RAM) 4.00 GB
Total Physical Memory                   3.87 GB
Available Physical Memory               1.53 GB
Total Virtual Memory                    7.74 GB
Available Virtual Memory                5.57 GB
 
I’ve installed
ruby - 2.1.3p242 (2014-09-19 revision 47630) [i386-mingw32]
rails - Rails 4.1.6
Chef - chef-windows-11.16.2-1.windows.msi
chef-starter.zip – unzipped it to C:\users\eroberts\chef-repo
 
When I start a command window with or without admin rights then:
 
C:\Users\eroberts>cd chef-repo
C:\Users\eroberts\chef-repo>knife --version
C:/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 --version
C:/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 (r
equired)>'
        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 Roberts 
OraMetrix
2350 Campbell Creek Blvd, Suite 400
Richardson, Tx 75082
 
O: (972) 728-5511
M: (214) 535-7413
 
 
 



Archive powered by MHonArc 2.6.16.

§