I'm in the exactly same situation (windows workstation and linux servers),
and bill's kitchen [0] is what works for me 
It gives you all you need for developing with chef on windows (e.g. ruby,
devkit, chef, vagrant, git, editor, etc..) in a portable zip file (no need
to install anything - just unpack and go). It has the additional benefit
that if you are working in a team it's easy to distribute/setup and
everyone uses the same environment (bye bye "it works on my machine").
It currently ships with Ruby 1.9.3.p392 which brings huge performance
improvements compared to previous 1.9.3 versions (probably on par with
2.0).
It's still on chef 10.x, but should be easy to update to chef 11 by editing
this Gemfile [1]. The other gems in there might need an update as well.
(note that this specific Gemfile is only used for installing a consistent
set of useful chef-related gems to the bill's kitchen ruby before it's
packaged into a zip file).
That being said, I'd definitely recommend to use project-specific Gemfiles
declaring only the gems that you really need in this project (or chef repo
or cookbook repo) and then use bundle exec...
. This will reduce the load
path to the minimum required for your project and can makes a huge
difference - especially on windows.
HTH,
Torben
[0] GitHub - tknerr/bills-kitchen: All you need for cooking with Chef and Vagrant on Windows you will find in Bill's Kitchen
[1] https://github.com/tknerr/bills-kitchen/blob/master/files/Gemfile
On Wed, May 15, 2013 at 8:18 PM, Benjamin Bytheway bbytheway@gmail.comwrote:
We're trying to get chef client omnibus 11.4.4 currently.
I've tried using the windows ruby installer + devkit and install chef from
gems. Installing win32-api from gems (--platform ruby to force a complie)
appears to work, but when you try to require it, ruby can't find it.
I did a manual install of the win32-api lib to site_ruby (not a gem) and
it looks like ruby can find it that way, and knife runs (and MUCH faster).
I'll have to keep digging and see why win32-api gem doesn't install
properly under 2.0.
On Wed, May 15, 2013 at 10:27 AM, Daniel DeLeo dan@kallistec.com wrote:
I understand that Ruby 2.0 has some huge fixes that make the gem
loading faster, but it looks like chef + ruby2 on Windows isn't working yet
(win32-api gem isn't working). Is there a roadmap anywhere to get to Ruby 2
support (especially on Windows)?
Many gems with C extensions pre-compile them on windows. Newish versions
of ruby gems will show you this by default:
$ gem list win32-api -r
win32-api (1.4.8 ruby x86-mingw32, 1.4.6 x86-mswin32-60, 1.4.0
x86-mswin32-80, 1.0.4 mswin32)
If you gem fetch win32-api --platform x86-mingw32
and then gem unpack
it, you can see that there's ruby ABI (binary interface) specific paths:
$ ls -1 lib/win32
api.rb
ruby18
ruby19
So, basically you need to track down the gem owners (see
win32-api | RubyGems.org | your community gem host ) and convince them to make a new
release with ruby 2.0 ABI extensions.
In the meantime, if you have compilers on your system, you can install
these gems manually with gem install GEMNAME --platform ruby
which will
pull the gem that just has the C source and build the extensions on your
box. If you go this route, I'd appreciate if you can let us know how it all
works.
Thanks in advance,
Ben Bytheway
Thanks,
--
Daniel DeLeo