Active Record not found
- From: Gray Bowman <gray.bowman@xxxxxxxxx>
- Date: Sat, 30 Jun 2007 05:34:53 +0900
I'm new to ruby, so I may have this all wrong. I'm trying to use
activerecord to manage database functions for a small script I'm
writing. I've installed the activerecord gem, and verified it's in the
list of local gems.
require 'net/http'
require 'rubygems'
gem 'activerecord'
ActiveRecord::Base.establish_connection(
:adapter => 'mysql',
:host => 'localhost',
:username => 'root',
:password => '',
:database => 'app_development')
class Thing < ActiveRecord::Base
end
when I run I get the error:
app/gatherer.rb:5: uninitialized constant ActiveRecord (NameError)
I've tried running from Aptana, the One-Click install and Instantrails.
I get the same error in each. I'm thinking I must be doing something
wrong.
Any guidance is appreciated.
--
Posted via http://www.ruby-forum.com/.
.
- Follow-Ups:
- Re: Active Record not found
- From: Jan Friedrich
- Re: Active Record not found
- From: Jan Friedrich
- Re: Active Record not found
- From: Bira
- Re: Active Record not found
- Prev by Date: Re: newbie questions on processing numerical data from text files
- Next by Date: Re: Active Record not found
- Previous by thread: Questions about clusterer 0.1.9 gem
- Next by thread: Re: Active Record not found
- Index(es):
Relevant Pages
|