#!/usr/bin/env ruby require 'rubygems' require "daemons" require "daemons/rails/config" config = Daemons::Rails::Config.new("<%= file_name %>", File.dirname(__FILE__) + "/../../") Daemons.run File.dirname(__FILE__) + "/<%= file_name %>.rb", config.to_hash