Skip to content

Instantly share code, notes, and snippets.

@mcansky
Created June 10, 2010 12:36
Show Gist options
  • Select an option

  • Save mcansky/432924 to your computer and use it in GitHub Desktop.

Select an option

Save mcansky/432924 to your computer and use it in GitHub Desktop.
# script
#!/usr/bin/env ruby
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'boot'))
require 'delayed/command'
Delayed::Command.new(ARGV).daemonize
#### output
$ PADRINO_ENV=development script/delayed_job.rb start
=> Located unlocked Gemfile for development
/Users/mcansky/.rvm/gems/ree-1.8.7-2010.01@kc_padrino/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:105:in `const_missing': uninitialized constant Delayed::Command::RAILS_ROOT (NameError)
from /Users/mcansky/.rvm/gems/ree-1.8.7-2010.01@kc_padrino/bundler/gems/delayed_job-0ca4e5f2bd8a5e17dca7c1abab692a049c1669e1-master/lib/delayed/command.rb:13:in `initialize'
from script/delayed_job.rb:5:in `new'
from script/delayed_job.rb:5
$
@DAddYE
Copy link

DAddYE commented Jun 10, 2010

Try this

#!/usr/bin/env ruby

require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'boot'))
RAILS_ROOT = PADRINO_ROOT
require 'delayed/command'
Delayed::Command.new(ARGV).daemonize

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment