Newly installed Ruby gems not showing up in $LOAD_PATH

Posted by randombits on Stack Overflow See other posts from Stack Overflow or by randombits
Published on 2010-05-29T19:18:18Z Indexed on 2010/05/29 19:22 UTC
Read the original article Hit count: 444

Filed under:
|

I'm using MacPorts in order to manage my Ruby/Rails/Gems installations. Recently after doing a gem install wirble, wirble fails to load when I start an instance of irb. Here's the output:

$ irb --simple-prompt
Couldn't load Wirble: no such file to load -- wirble

The Wirble gem doesn't show up in my $LOAD_PATH:

>> puts $:
/opt/local/lib/ruby1.9/gems/1.9.1/gems/actionmailer-2.3.5/lib
/opt/local/lib/ruby1.9/gems/1.9.1/gems/actionpack-2.3.5/lib
/opt/local/lib/ruby1.9/gems/1.9.1/gems/activerecord-2.3.5/lib
/opt/local/lib/ruby1.9/gems/1.9.1/gems/activeresource-2.3.5/lib
/opt/local/lib/ruby1.9/gems/1.9.1/gems/activesupport-2.3.5/lib
/opt/local/lib/ruby1.9/gems/1.9.1/gems/mysql-2.8.1/lib
/opt/local/lib/ruby1.9/gems/1.9.1/gems/mysql-2.8.1/ext
/opt/local/lib/ruby1.9/gems/1.9.1/gems/mysql-2.8.1/bin
/opt/local/lib/ruby1.9/gems/1.9.1/gems/rack-1.0.1/bin
/opt/local/lib/ruby1.9/gems/1.9.1/gems/rack-1.0.1/lib
/opt/local/lib/ruby1.9/gems/1.9.1/gems/rails-2.3.5/bin
/opt/local/lib/ruby1.9/gems/1.9.1/gems/rails-2.3.5/lib
/opt/local/lib/ruby1.9/gems/1.9.1/gems/rake-0.8.7/bin
/opt/local/lib/ruby1.9/gems/1.9.1/gems/rake-0.8.7/lib
/opt/local/lib/ruby1.9/gems/1.9.1/gems/rubygems-update-1.3.7/hide_lib_for_update
/opt/local/lib/ruby1.9/gems/1.9.1/gems/rubygems-update-1.3.7/bin
/opt/local/lib/ruby1.9/site_ruby/1.9.1
/opt/local/lib/ruby1.9/site_ruby/1.9.1/i386-darwin10
/opt/local/lib/ruby1.9/site_ruby
/opt/local/lib/ruby1.9/vendor_ruby/1.9.1
/opt/local/lib/ruby1.9/vendor_ruby/1.9.1/i386-darwin10
/opt/local/lib/ruby1.9/vendor_ruby
/opt/local/lib/ruby1.9/1.9.1
/opt/local/lib/ruby1.9/1.9.1/i386-darwin10
.
=> nil
>> 

The gem is definitely installed:

$ gem list |grep -i wirble
wirble (0.1.3)

It is located in /opt/local/lib/ruby/gems/1.9.1/gems/wirble-0.1.3/

How do I get this and future gems I installed appended to my $LOAD_PATH?

© Stack Overflow or respective owner

Related posts about ruby

Related posts about irb