title: Gem Path Issue: RubyGems looking in the wrong place
body: <p>When I require certain gems, some of them work and some of them don't work. They seem to install find and I can do a gem list and they are there. However, when I try to run them in Irb or run my ruby programs from the terminal I get the following:</p>
  
  <pre><code>LoadError: no such file to load -- sanitize
  
  /Library/Ruby/Site/1.8/rubygems/custom_require.rb:54:in `gem_original_require'
  </code></pre>
  
  <p>And so I followed the guide on RubyGems and everything seems fine:</p>
  
  <pre><code>noahclark$ gem list sanitize
  *** LOCAL GEMS ***
  sanitize (2.0.3)
  
  
  noahclark$ ruby -rubygems -e 'require "sanitize"'
  noahclark$ 
  
  noahclark$ which ruby
  /opt/local/bin/ruby
  noahclark$  gem env | grep 'RUBY EXECUTABLE'
  - RUBY EXECUTABLE: /opt/local/bin/ruby
  </code></pre>
  
  <p>So then I tried:</p>
  
  <pre><code>noahclark$ which gem
  /opt/local/bin/gem
  
  noahclark$ gem environment
  RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.10
  - RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin10]
  - INSTALLATION DIRECTORY: /opt/local/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: /opt/local/bin/ruby
  - EXECUTABLE DIRECTORY: /opt/local/bin
  - RUBYGEMS PLATFORMS:
      - ruby
     - x86-darwin-10
   - GEM PATHS:
      - /opt/local/lib/ruby/gems/1.8
      - /Users/noahclark/.gem/ruby/1.8
   - 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>You can see that which gem and gem environment are looking at two separate directories. I hunted around for a fix and I could only find something that suggested adding export PATH=$PATH:/opt/local/bin/gem to my .bashrc file. This did not fix it. </p>
  
  <p>How should I go about fixing this?</p>