Information Technology Reference
In-Depth Information
WHERE DO RUBY GEMS GET INSTALLED?
The
gem install
command installs gem files to its
installation directory
. The Omnibus Install
gem
command stores gems in the directory containing Chef's private copy of Ruby:
/opt/chef/em-
bedded
.
You can verify this by using the
gem env
command to view the gem environment. It will list the
INSTALLATION_DIRECTORY
as
/opt/chef/embedded/lib/ruby/gems/1.9.1
:
$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.29
- RUBY VERSION: 1.9.3 (2013-11-22 patchlevel 484) [x86_64-darwin11.2.0]
- INSTALLATION DIRECTORY: /opt/chef/embedded/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /opt/chef/embedded/bin/ruby
- EXECUTABLE DIRECTORY: /opt/chef/embedded/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-11
- GEM PATHS:
- /opt/chef/embedded/lib/ruby/gems/1.9.1
- /Users/vagrant/.gem/ruby/1.9.1
...
NOTE
Why does the directory have 1.9.1 in it when the Ruby version is 1.9.3? The version of the
installation directory refers to the
standard library version
, not the
core language version
.
Every “batteries included” language like Ruby contains a large set of standard libraries to
complement core language functionality. Historically, Ruby hasn't always changed the
standard library at the same rate as the core language. Ruby 1.9.1, 1.9.2, and 1.9.3 all use the
same standard library version: 1.9.1.
Verify the Test Kitchen Installation on Mac OS X (Chef Client Only)
You can verify that the
test-kitchen
gem is installed by using the
gem list
command. If
Test Kitchen is already installed, the
gem list
command will display the output
true
: