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


Chronological Thread 
  • From: Fabien Delpierre < >
  • To:
  • Subject: [chef] Re: Re: Setting up Chef client on Windows 7
  • Date: Wed, 24 Sep 2014 12:43:55 -0400

I'm not sure if what I'm about to say recently changed, but as far as I know, you want Ruby 1.9.3, not 2.1. As another person pointed out, Chef comes with its own embedded Ruby that is "certified" to work with the Chef tools.
I would suggest that you uninstall both Ruby and Chef, then go grab ChefDK from https://downloads.getchef.com/chef-dk/, install that and see how things go.
If you need your "own" instance of Ruby 2.1, install it, but be mindful not to mess with Chef's embedded Ruby.

You may also want to read http://misheska.com/blog/2013/12/26/set-up-a-sane-ruby-cookbook-authoring-environment-for-chef/, again keeping in mind that Chef's Ruby version requirements may have changed, so it should be easier just to use ChefDK.

On Wed, Sep 24, 2014 at 11:13 AM, Tensibai Zhaoying < " target="_blank"> > wrote:

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
 
 
 
 




Archive powered by MHonArc 2.6.16.

§