can't require ActiveRecord gem

X

Xavier Noria

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)
 
J

Jim Weirich

Xavier said:
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
 
X

Xavier Noria

Xavier said:
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
 

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

No members online now.

Forum statistics

Threads
474,470
Messages
2,571,809
Members
48,797
Latest member
PeterSimpson
Top