It appears that the Chef Server is installed into a virtual machine created by Vagrant (
/opt/vagrant_ruby). However, Chef Server 11+ is built on Erlang, not Ruby. It does come with Ruby, but you shouldn't use it directly. It's there for managing the Chef Server with
The installation in the Vagrant box above probably puts the various Ruby binaries in the default $PATH, which means that using
gem install will attempt to install the
knife-windows gem into the Ruby placed there by Vagrant.
To further explain, the packages that Opscode provides for Chef and Chef Server include their own separate installation of Ruby. Opscode does this because the supported platforms for Chef and Chef Server all have different (outdated) versions of Ruby provided by default.
Day to day, most interaction with the Chef Server will be through the API using
knife (or the webui).
knife and its plugins should be used from a "workstation" system like a local laptop. If Chef is the only reason to have Ruby installed, then use the Ruby embedded in the Chef package, which should be installed on the local system. Installers are available for most major platforms, including Ubuntu, Windows, OS X, and others. Various development headers and build tools (gcc, make, etc) may be required depending on the plugins.
For what it's worth, the version of Ruby in the current "omnibus" package for Chef Server is not 1.8.7. It can be found at:
ubuntu@os-9348884648703137:~$ /opt/chef-server/embedded/bin/ruby --version
ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-linux]
(current version as of this writing)
The version of Ruby used in the Chef client package is generally updated more frequently, as the needs of client/workstation use move quicker than the Chef Server. The embedded version of Ruby in the Chef client package is:
% /opt/chef/embedded/bin/ruby --version
ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-darwin11.2.0]
Opscode plans to update this version in the next release, so it may be different than what is shown for future visitors to this site. Also note that this came from a "local workstation" installation rather than the Chef Server.