From: Michael Hollins Date: 2007-06-30T11:30:07+09:00 Subject: Re: Active Record not found Gray Bowman wrote: > Jan Friedrich wrote: >> activerecord != active_record ;) >> >> To require gems you need also to require rubygems: >> >> require 'rubygems' >> require 'active_record' > > > So I guess I'm really confused then. This is my final code: > > require 'net/http' > require 'active_record' > > ActiveRecord::Base.establish_connection( > :adapter => 'mysql', > :host => 'localhost', > :username => 'root', > :password => '', > :database => 'app_development') > > class Thing < ActiveRecord::Base > end > > This works in IRB, and on the command line. I'm happy now, but still > wondering... > > I didn't have to "require 'rubygems'" for this to work, why? Isn't > ActiveRecord a gem? And if so, shouldn't I have to use "gem > 'active_record'" instead? Do you happen to have the RUBYOPT environment variable set as follows? RUBYOPT=-rubygems