# 1.9.1 - some gems not added to LOAD\_PATH?

**URL:** <https://www.ruby-forum.com/t/1-9-1-some-gems-not-added-to-load-path/159716>\
**Category:** Ruby\
**Created:** [February 7, 2009, 2:22pm UTC](https://www.ruby-forum.com/t/1-9-1-some-gems-not-added-to-load-path/159716 "2009-02-07T14:22:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 7, 2009, 2:22pm UTC](https://www.ruby-forum.com/t/1-9-1-some-gems-not-added-to-load-path/159716/1 "2009-02-07T14:22:01Z")

</div>

Hello,  
I’d like to be educated a bit on how rubygems in 1.9-p0 works together  
with  
$LOAD\_PATH, because it it seems slightly inconsistent to me, for  
instance  
mocha 0.9.5 is installed, but not in my load path:

$ gem1.9 list | grep mocha  
mocha (0.9.5)  
$ irb1.9  
irb(main):001:0\> $LOAD\_PATH.grep /mocha/i  
=\> []

irb(main):002:0\> pp `gem1.9 list`.split("\n").select{|g|  
$LOAD\_PATH.grep(/#{g.split(" ").first}/) == [] }  
[“addressable (2.0.2)”,  
“archive-tar-minitar (0.5.2)”,  
“cgi\_multipart\_eof\_fix (2.5.0)”,  
“data\_objects (0.9.11)”,  
“do\_sqlite3 (0.9.11)”,  
“extlib (0.9.10)”,  
“gmailer (0.2.1)”,  
“meta\_project (0.4.15)”,  
“mime-types (1.15)”,  
“mocha (0.9.5)”,  
“mongrel (1.1.2.0.1, 1.1.2)”,  
“open4 (0.9.6)”,  
“plist (3.0.1, 3.0.0)”,  
“ruby-yadis (0.3.4)”,  
“stomp (1.0.6)”,  
“textpow (0.10.2)”,  
“thin (1.0.0)”]

Any reason why these aren’t put into the LOAD\_PATH?

And similary the gem() command doesn’t like spaces in the version  
argument:  
irb(main):001:0\> gem ‘mocha’, ‘\>= 0’  
NoMethodError: undefined method `<=>' for nil:NilClass from <internal:gem_prelude>:249:in`push\_gem\_version\_on\_load\_path’  
from internal:gem\_prelude:14:in `gem' from (irb):1 from /usr/local/bin/irb1.9:12:in`’  
irb(main):002:0\> gem ‘mocha’, ‘\>=0’  
=\> true  
irb(main):003:0\> require ‘mocha’  
=\> true

So, my question is; what’s the secret sauce needed here?

Cheers,  
JS
