G
Gray Bowman
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',
assword => '',
: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.
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',
assword => '',
: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.