[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

can't require ActiveRecord gem

Xavier Noria

3/27/2006 5:14:00 PM

According to the manual, if I call ruby this way

ruby -rubygems script_that_uses_gem

require_gem is not needed, plain require is enough.

This indeed is working as documented with WWW::Mechanize, but not
with ActiveRecord, which loads fine with require_gem. Is this
something known?

-- fxn

Running:

ruby 1.8.4 (2005-12-24) [powerpc-darwin8.3.0]
RubyGems 0.8.11
activerecord (1.13.2)




2 Answers

Jim Weirich

3/27/2006 8:04:00 PM

0

Xavier Noria wrote:
> According to the manual, if I call ruby this way
>
> ruby -rubygems script_that_uses_gem
>
> require_gem is not needed, plain require is enough.
>
> This indeed is working as documented with WWW::Mechanize, but not
> with ActiveRecord, which loads fine with require_gem. Is this
> something known?
>
> -- fxn
>
> Running:
>
> ruby 1.8.4 (2005-12-24) [powerpc-darwin8.3.0]
> RubyGems 0.8.11
> activerecord (1.13.2)

Make sure you say: require 'active_record'
Rather than: require 'activerecord'

"activerecord" is the gem. "active_record" is the file to be required.

-- Jim Weirich

--
Posted via http://www.ruby-....


Xavier Noria

3/27/2006 8:08:00 PM

0

On Mar 27, 2006, at 22:03, Jim Weirich wrote:

> Xavier Noria wrote:
>> According to the manual, if I call ruby this way
>>
>> ruby -rubygems script_that_uses_gem
>>
>> require_gem is not needed, plain require is enough.
>>
>> This indeed is working as documented with WWW::Mechanize, but not
>> with ActiveRecord, which loads fine with require_gem. Is this
>> something known?
>>
>> -- fxn
>>
>> Running:
>>
>> ruby 1.8.4 (2005-12-24) [powerpc-darwin8.3.0]
>> RubyGems 0.8.11
>> activerecord (1.13.2)
>
> Make sure you say: require 'active_record'
> Rather than: require 'activerecord'
>
> "activerecord" is the gem. "active_record" is the file to be
> required.

Gotcha! Thank you very much Jim.

-- fxn