If you need your script to have access to ActiveRecord, ActiveMail, et al. you can place these directives at the top of your script:
#!/usr/bin/env ruby require 'rubygems' require_gem 'activesupport'
activerecordconfigurationlanguagesmodulesprogrammingrailsrorruby