Bugs item #29300, was opened at 2011-06-29 17:36
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=29300&group_id=126

Category: #gem and #require methods
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Tom Trebisky (trebisky)
Assigned to: Nobody (None)
Summary: gem and require behavior changed

Initial Comment:
Once upon a time I had a script that worked, it used activerecord and pulled in 
that gem via the 3 lines:

require "rubygems"
gem "activerecord"
require "activerecord"

Now the script fails with 

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in 
`gem_original_require': no such file to load -- activerecord (LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in `require'

But I have a working rails install, so I know activerecord is on my system and 
healthy.  After hours and hours of frustration, I find I can fix things by
changing the above 3 lines to:

require "rubygems"
require "active_record"

My take on this is that the behavior of the gem commands changed
(I am now using rubygems 1.8.5, but 1.7.2 exhibited the same breakage).
In the good old days, the gem command activated the activerecord gem and
did some magic so the require would work (despite the unfortunately
different naming of the file providing the gem).  Maybe somebody decided
that the magic was a bad idea?


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

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=29300&group_id=126
_______________________________________________
Rubygems-developers mailing list
http://rubyforge.org/projects/rubygems
Rubygems-developers@rubyforge.org
http://rubyforge.org/mailman/listinfo/rubygems-developers

Reply via email to