# Can't require ActiveRecord gem

**URL:** <https://www.ruby-forum.com/t/cant-require-activerecord-gem/87839>\
**Category:** Ruby\
**Created:** [March 27, 2006, 7:14pm UTC](https://www.ruby-forum.com/t/cant-require-activerecord-gem/87839 "2006-03-27T19:14:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fxn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/77aa72/32.png) [@fxn](https://www.ruby-forum.com/u/fxn)\
**Post date:** [March 27, 2006, 7:14pm UTC](https://www.ruby-forum.com/t/cant-require-activerecord-gem/87839/1 "2006-03-27T19:14:38Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![fxn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/77aa72/32.png) [@fxn](https://www.ruby-forum.com/u/fxn)\
**Post date:** [March 27, 2006, 10:03pm UTC](https://www.ruby-forum.com/t/cant-require-activerecord-gem/87839/2 "2006-03-27T22:03:17Z")

</div>

Xavier N. 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 W.

---

<div class="post-metadata">

**Author:** ![fxn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/77aa72/32.png) [@fxn](https://www.ruby-forum.com/u/fxn)\
**Post date:** [March 27, 2006, 10:07pm UTC](https://www.ruby-forum.com/t/cant-require-activerecord-gem/87839/3 "2006-03-27T22:07:42Z")

</div>

On Mar 27, 2006, at 22:03, Jim W. wrote:

> > 
> 
> “activerecord” is the gem. “active\_record” is the file to be  
> required.

Gotcha! Thank you very much Jim.

– fxn
