gem require 'activerecord' or 'active_record'

J

jansenh

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
 
K

Kyle Schmitt

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
 
M

malugu satyajit

Note: parts of this message were removed by the gateway to make it a legal Usenet post.

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

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


--
Regards,
M.Satyajit
Graduate Student,
Department of Computer Science,
NCSU.
www4.ncsu.edu/~smalugu
 

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
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top