Bugs item #29300, was opened at 2011-06-29 21: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: Closed
>Resolution: Rejected
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?


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

>Comment By: Luis Lavena (luislavena)
Date: 2011-06-29 21:57

Message:
Closing this out as appears to be a gem issue and not RubyGems itself.

Please feel free to open a Issue on GitHub:
https://github.com/rubygems/rubygems/issues

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

Comment By: Luis Lavena (luislavena)
Date: 2011-06-29 21:53

Message:
Hello,

RubyGems tracker as moved to GitHub:

https://github.com/rubygems/rubygems/issues

This was intentionally disabled from the the interface but seems you had a 
permalink to it.

Either way:

Which version of ActiveRecord are you talking about?

Asking this because ActiveRecord from long ago was distributed as 
"activerecord" gem but the require is "active_record", as you can see in the 
source code by yourself (just do a gem unpack activerecord and check lib 
directory)

Hope that helps.

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

Comment By: Steve Klabnik (steveklabnik)
Date: 2011-06-29 21:51

Message:
Uhhhh...  ActiveRecord changed the name to active_record with 3.0.x, IIRC. I'm 
not sure this has anything to do with Rubygems.

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

Comment By: Luis Lavena (luislavena)
Date: 2011-06-29 21:51

Message:
Hi!

Believe it or not, we're moving to github's issue tracker! The 
pressure to move has been loud and clear, but for the longest time 
it didn't support the way we worked. Now that it has freeform 
labels it can support our workflow adequately. There is just one 
problem: Your bug is here and we don't want to lose you!

What we'd like you to do is fairly painless and should only take a 
few minutes:

Please file the _exact_ same ticket on github and provide a link 
back to this crufty old ticket so we can refer to any previous 
discussion that occurred. Once the new ticket is made, put a 
forwarding link to it here and close this ticket out. In a couple 
weeks, we'll track down the old tickets that are still open and 
decide what to do with them.

We could have done this fairly automatically, but we really want 
you to do it so you're attached to the ticket and we can still 
communicate with you and keep a record of it.

https://github.com/rubygems/rubygems/issues

Thanks,

The RubyGems Team

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

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