On Aug 18, 3:32 am, Brian C. [email protected] wrote:
Thank you! I come from Perl, so I kept thinking use lib. I can
probably look it up, but since you’re here, is require ‘app/models/*’
However you still need to establish_connection to the database in your
Alternatively you may decide to bootstrap the entire Rails environment,
which you can do most easily by running your script like so:
Then it will use the config/database.yml entries to connect to the
database as well.
script/runner sounds like it will load a Ruby script using the rails
environment variables? I will look this up! This sounds even more
like what I need!
Also, you can use script/console to get an irb session with the models
already wired up.
Too simple, but irb is definitely an under-utilized tool.
Thank you very much! The simple answers are the best, and I very much
think that these will do it.