Gwyn Morfey's Rails Notes

This is now my scratchpad for notes that I’ll eventually turn into proper wiki articles. It’s public so that it’ll be useful in the meantime.

To make any ruby script run in your rails environment, use script/runner, or add these lines to the top:
require File.dirname(__FILE__) + ‘/../config/boot’
require RAILS_ROOT + ‘/config/environment’

(You might need to do it that way if you’re using Daemonize)