1.9.1 - some gems not added to LOAD_PATH?

  • Thread starter Johan Sørensen
  • Start date
J

Johan Sørensen

[Note: parts of this message were removed to make it a legal post.]

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 `<main>'
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top