title: What is the default search path for Ruby gems? i.e. the default GEM_HOME
body: <p>What is the default search path for Ruby gems?  I'm trying to figure what directories I can pass to <code>gem</code>'s <code>--install-dir</code> switch, so that I don't have to set the environment variable <code>GEM_HOME</code> for the gems to be found.</p>
  
  <p>In particular, if I install the gem <a href="https://github.com/mojombo/jekyll" rel="noreferrer">jekyll</a> via</p>
  
  <pre><code>$ gem install --bindir /usr/local/bin --install-dir /usr/local/lib/ruby/gems/1.8 jekyll
  </code></pre>
  
  <p>then <code>/usr/local/bin/jekyll</code> can't find its libraries without explicitly setting <code>GEM_HOME</code>:</p>
  
  <pre><code>$ jekyll --help
  /usr/lib/ruby/1.8/rubygems.rb:779:in `report_activate_error': Could not find RubyGem jekyll (&gt;= 0) (Gem::LoadError)
      from /usr/lib/ruby/1.8/rubygems.rb:214:in `activate'
      from /usr/lib/ruby/1.8/rubygems.rb:1082:in `gem'
      from /usr/local/bin/jekyll:18
  $ GEM_HOME=/usr/local/lib/ruby/gems/1.8 jekyll --help
  Jekyll is a blog-aware, static site generator.
  [ ... ]
  </code></pre>
  
  <p>It seems that ruby itself will look in the directories listed in the Ruby variable <code>$LOAD_PATH</code>, which can be augmented by the environment variable <code>RUBYLIB</code>.  However, where does the rubygem system search for gems?</p>