From: jotto Date: 2006-10-14T13:55:14+09:00 Subject: Basic ActiveRecord Usage I want to run a Ruby script outside of Rails and still use Active Record. This is what I'm trying but I am getting a "const_missing" error - do I need to reference the connection in the printlisting method?: require 'rubygems' require 'active_record' class TheMode < ActiveRecord::Base def initialize end def printlisting ActiveRecord::Base.establish_connection(:adapter => "mysql", :host => "localhost", :username => "root", :password => "root", :database => "commentstable") listing = Comment.find(:all) puts listing.text end temp = TheMode.new temp.modemaker