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