support a model within a script


I want to write a script (something like script/breakpointer) which
recognizes the models in my rails application. I tried inheriting from
my model class, but I get an "uninitialized constant (NameError)"
error. Any suggestions?

Put your code in a class in the lib directory, say myclass.rb. Define
class methods which will be your entry points.

class Myclass
  def self.mymethod

Then just run script/runner "Myclass.mymethod" -e [environment]