title: Ruby gem wrong installation directory
body: <p>I had Ruby 1.9.2 install, but I uninstalled it long ago. Today I installed a brand new version of Ruby 1.9.3, downloaded gem and set it up with <code>ruby setup.rb</code>.</p>
  
  <p>I then noticed that installing gems failed, so I checked <code>gem environment</code> and this is what I get:</p>
  
  <pre><code>RubyGems Environment:
    - RUBYGEMS VERSION: 1.8.11
    - RUBY VERSION: 1.9.3 (2011-10-30 patchlevel 0) [i386-mingw32]
    - INSTALLATION DIRECTORY: c:/Ruby192/lib/ruby/gems/1.9.1
    - RUBY EXECUTABLE: C:/Ruby193/bin/ruby.exe
    - EXECUTABLE DIRECTORY: c:/Ruby192/lib/ruby/gems/1.9.1/bin
    - RUBYGEMS PLATFORMS:
      - ruby
      - x86-mingw32
    - GEM PATHS:
       - c:/Ruby192/lib/ruby/gems/1.9.1
       - C:/.gem/ruby/1.9.1
       - C:/Ruby193/lib/ruby/gems/1.9.1
    - GEM CONFIGURATION:
       - :update_sources =&gt; true
       - :verbose =&gt; true
       - :benchmark =&gt; false
       - :backtrace =&gt; false
       - :bulk_threshold =&gt; 1000
    - REMOTE SOURCES:
       - http://rubygems.org/
  </code></pre>
  
  <p>It seems messing up the new installation (Ruby193) with the old one (Ruby192).</p>
  
  <p><code>ruby -v</code> yields, correctly, <code>ruby 1.9.3p0 (2011-10-30) [i386-mingw32]</code>.</p>
  
  <p>How to solve the problem?</p>
  
  <p><strong>EDIT</strong>: I had GEM_HOME and RUBYLIB environment variables set up to the old directories. Updating them solved the problem.</p>