title: Failed to load ruby gem, using require method in IRB
body: <p>i've created my own rubygem, but when i try in my local machine, there were something annoying, i've been around in google and another StackOverflow question but still not found the solution about this problem.</p>
  
  <p>If i use non-root user in <strong>irb</strong> and type <strong>require 'my_own_gem'</strong> after type <strong>require 'rubygems'</strong> i've got :</p>
  
  <pre><code>LoadError: no such file to load -- my_own_gem
      from /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
      from /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `require'
      from (irb):2
      from (null):0
  </code></pre>
  
  <p>But when using root user, with sudo irb, the problem isn't seen and everything look OK.</p>
  
  <p><strong>gem list -d my_own_gem</strong></p>
  
  <pre><code>my_own_gem (0.0.1)
      Author: Jane Doe
      Rubyforge: http://rubyforge.org/projects/my_own_gem
      Homepage: google.com
      Installed at: /var/lib/gems/1.8
  
      lorem ipsum dolor sit amet
  </code></pre>
  
  <p><strong>gem env</strong></p>
  
  <pre><code>RubyGems Environment:
    - RUBYGEMS VERSION: 1.3.7
    - RUBY VERSION: 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
    - INSTALLATION DIRECTORY: /var/lib/gems/1.8
    - RUBY EXECUTABLE: /usr/bin/ruby1.8
    - EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
    - RUBYGEMS PLATFORMS:
      - ruby
      - x86_64-linux
    - GEM PATHS:
       - /var/lib/gems/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><strong>.bashrc</strong></p>
  
  <pre><code>export GEM_HOME=/var/lib/gems/1.8
  export GEM_PATH=/var/lib/gems/1.8
  </code></pre>
  
  <p><strong>my_own_gem.gemspec</strong></p>
  
  <pre><code># -*- encoding: utf-8 -*-
  $:.push File.expand_path("../lib", __FILE__)
  require "my_own_gem/version"
  
  Gem::Specification.new do |s|
    s.name        = "my_own_gem"
    s.version     = MyOwnGem::VERSION
    s.platform    = Gem::Platform::RUBY
    s.authors     = ["Jane Doe"]
    s.email       = ["j4n3d0e@gmail.com"]
    s.extra_rdoc_files = ["MIT-LICENSE","README.rdoc"]
    s.rdoc_options = ["--charset=UTF-8"]
    s.homepage    = "google.com"
    s.summary     = %q{lorem ipsum}
    s.description = %q{lorem ipsum dolor sit amet}
    s.date = Time.now.utc.strftime("%A, %d% %B %Y")
    s.rubyforge_project = "my_own_gem"
  
    s.add_dependency "httparty", "= 0.7.8"
  
    s.post_install_message = "my own gem"
  
    s.files         = `git ls-files`.split("\n")
    s.test_files    = `git ls-files -- {test,spec,features}/*`.split("\n")
    s.executables   = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
    s.require_paths = ["lib"]
  
  end
  </code></pre>