# Gem require 'activerecord' or 'active\_record'

**URL:** <https://www.ruby-forum.com/t/gem-require-activerecord-or-active-record/121903>\
**Category:** Ruby\
**Created:** [December 2, 2007, 6:01pm UTC](https://www.ruby-forum.com/t/gem-require-activerecord-or-active-record/121903 "2007-12-02T18:01:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jansenh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6f9a4e/32.png) [@jansenh](https://www.ruby-forum.com/u/jansenh)\
**Post date:** [December 2, 2007, 6:01pm UTC](https://www.ruby-forum.com/t/gem-require-activerecord-or-active-record/121903/1 "2007-12-02T18:01:03Z")

</div>

Hi comp.lang.ruby

I am doing my first thing with ActiveRecord (without Rails), and to  
help me out I have the ‘Pro ActiveRecord’ book from APress, which is a  
fine resource, except from one annoying thing; all pieces of sample  
code in the book uses the statement:

require ‘activerecord’

which refuses to work on both my windows-ruby and ubuntu-ruby setups.  
Searching this group I learned that using the statement:

require ‘active\_record’

solves that problem. What am I missing? What’s the difference between  
the two, and why is only one of them working on my code?

regards, henning

---

<div class="post-metadata">

**Author:** ![jansenh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6f9a4e/32.png) [@jansenh](https://www.ruby-forum.com/u/jansenh)\
**Post date:** [December 2, 2007, 9:37pm UTC](https://www.ruby-forum.com/t/gem-require-activerecord-or-active-record/121903/2 "2007-12-02T21:37:47Z")

</div>

It may have something to do with the version of ruby installed, or how  
activerecord was installed, or ruby was setup, etc etc.  
I recall that older versions of ruby need you to require ‘rubygems’ to  
access libraries installed with gem, where newer versions do not. It  
could be some similar sort of switch in behavior…

–Kyle

---

<div class="post-metadata">

**Author:** ![jansenh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6f9a4e/32.png) [@jansenh](https://www.ruby-forum.com/u/jansenh)\
**Post date:** [December 2, 2007, 11:59pm UTC](https://www.ruby-forum.com/t/gem-require-activerecord-or-active-record/121903/3 "2007-12-02T23:59:30Z")

</div>

Is it ok, to post Rails questions in this ruby list?

I have one question.

Can we have modules and mixins in rails framework? If so, what is the  
ideal  
place to put it in the MVC framework.

Specifically I have one SuperClass and three sub classes, except some  
all  
the functionality of the sub classes can be inherited from the super  
class.

I can give you much more details.

Satyajit
