[Rubygems-developers] [ rubygems-Bugs-28365 ] rubygems not uploading $LOAD_PATH with ruby 1.9.1

noreply at rubyforge.org noreply at rubyforge.org
Fri Nov 12 20:26:40 EST 2010


Bugs item #28365, was opened at 2010-07-08 12:28
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=28365&group_id=126

Category: #gem and #require methods
Group: v1.3.x
Status: Closed
Resolution: Rejected
Priority: 3
Submitted By: Giorgenes Gelatti (giorgenes)
Assigned to: Nobody (None)
Summary: rubygems not uploading $LOAD_PATH with ruby 1.9.1

Initial Comment:
I have successful installed gems, but when I do a require 'gemname' it fails. The $LOAD_PATH var shows the gem paths are not loaded.
I'm using ruby1.9.1p378 and gems 1.3.7 on ubuntu 10.04.

# gem list

*** LOCAL GEMS ***

rest-client (1.6.0)
.....

# irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> $:
=> ["/usr/local/lib/site_ruby/1.9.1", "/usr/local/lib/site_ruby/1.9.1/i486-linux", "/usr/local/lib/site_ruby", "/usr/lib/ruby/vendor_ruby/1.9.1", "/usr/lib/ruby/vendor_ruby/1.9.1/i486-linux", "/usr/lib/ruby/vendor_ruby", "/usr/lib/ruby/1.9.1", "/usr/lib/ruby/1.9.1/i486-linux", "."]
irb(main):003:0> require 'rest_client'
LoadError: no such file to load -- rest_client
	from (irb):3:in `require'
	from (irb):3
	from /usr/bin/irb:12:in `<main>'




----------------------------------------------------------------------

Comment By: James Tucker (raggi)
Date: 2010-07-09 06:59

Message:
Yup, this is a bug in ruby.

----------------------------------------------------------------------

Comment By: James Tucker (raggi)
Date: 2010-07-09 06:59

Message:
Yup, this is a bug in ruby.

----------------------------------------------------------------------

Comment By: Giorgenes Gelatti (giorgenes)
Date: 2010-07-08 13:08

Message:
I did a further investigation and found out that when ruby
is run with --disable-gems the gem loading works.

I looks like the line below on rubygems.rb is preventing the
load through 'require' to work in 1.9.1:

require 'rubygems/custom_require' if gem_disabled or
RUBY_VERSION < '1.9'

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=28365&group_id=126


More information about the Rubygems-developers mailing list