I am trying to write a small program to exercise certain of my Rails
classes without having to go through a browser.
I have a file that like this:
########### filer_convert.rb #################
require File.dirname(FILE) + ‘/…/…/config/boot’
require ‘filer’
Filer.convert(10)
#########################################
I want to use it to debug the Filer.convert method inside an IDE
(Komodo). filer.rb could be simply this:
############ filer.rb #######################
class Filer < ActiveRecord::Base
end
#########################################
I was hoping that the prelude to this file, the first two require
statements would be enough to allow me to
test rails classes. When I debug this, though, I get the error
something like “undefined constant Active Record”. I suspect there is
more that I need in the prelude to filer_convert.rb to get the whole
panopoly of rails functionality, but can’t figure out what it is.
What should be ‘required’ at the beginning of filer_convert.rb to
bring in all of rails?
Thank.