1.9.1 - some gems not added to LOAD_PATH?


#1

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:inpush_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