Skip to content

Instantly share code, notes, and snippets.

@onsails
Created April 13, 2010 00:55
Show Gist options
  • Save onsails/364197 to your computer and use it in GitHub Desktop.
Save onsails/364197 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require "#{RAILS_ROOT}/config/environment"
File.open "log/daemon.log", "w" if !File.exists? "log/daemon.log"
Daemon.spawn! :log_file => "#{RAILS_ROOT}/log/daemon.log",
:pid_file => "#{RAILS_ROOT}/tmp/pids/daemon.pid",
:sync_log => true,
:working_dir => RAILS_ROOT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment