views:

169

answers:

1

Here is what I have in my enviornment.rb. I understand there have been issues with restarting because of a bug in the "daemons" gem and that the ghazel-daemons fixes it. But its not working in my case. I am using the collectiveidea 2.1.0--pre version of DJ, rails 2.3.5.

config.gem 'delayed_job', :source => 'http://rubygems.org', :version
=> "2.1.0.pre"
    config.gem "ghazel-daemons", :lib => "daemons", :source => 'http://
gems.github.com'
    gem "ghazel-daemons"
    require "daemons"

But I stil can't get delayed_job to restart from capistrano.

    desc "Restart the delayed_job process"
    task :delayed_job_restart, :roles => :app do
        run "cd #{current_path};#{get_rails_env} script/delayed_job
restart"
    end

Thanks

A: 

I am currently using 2.0.3 without problems in 2.3.8, I believe that 2.1.0 is for rails 3 (reference).

I have not heard about the ghazel-daemons gem, I currently have the following patch within the rails application running against with the daemons gem:

patch: http://blog.rapleaf.com/dev/wp-content/uploads/2008/07/daemons_extension.rb

writeup: http://blog.rapleaf.com/dev/2008/02/15/making-sure-ruby-daemons-die/

Geoff Lanotte