Skip to content

Instantly share code, notes, and snippets.

@jcastaneyra
Created February 12, 2010 07:12
Show Gist options
  • Save jcastaneyra/302390 to your computer and use it in GitHub Desktop.
Save jcastaneyra/302390 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'daemons'
#require File.join(File.dirname(__FILE__), 'daemons_extension')
ENV['RAILS_ENV'] ||= 'development'
ENV['BUNDLE_GEMFILE'] ||= File.join(Dir.pwd, 'Gemfile')
options = {
:app_name => 'mail_consumer',
:dir_mode => :script,
:dir => '../log',
:backtrace => true,
:mode => :load,
:monitor => true
}
Daemons.run(File.join(File.dirname(__FILE__), 'mail_consumer.rb'), options)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment