views:

225

answers:

3

gettting this error.

  pid-file for killed process 8600 found (C:/cyncabc/tmp/pids/delayed_job.pid), deleting.
  c:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons/daemonize.rb:103:in `fork': fork() function is unimplemented on this machine (NotImplementedError)
        from 
  c:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons/daemonize.rb:103:in `safefork'
        from 
  c:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons/daemonize.rb:145:in `call_as_daemon'
        from 
  c:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons/application.rb:219:in `start_proc'
        from 
  c:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons/application.rb:255:in `start'
        from 
  c:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons/controller.rb:69:in `run'
        from 
  c:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons.rb:188:in `run_proc'
        from c:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons/cmdline.rb:105:in `call'
        from c:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons/cmdline.rb:105:in `catch_exceptions'
        from c:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons.rb:187:in `run_proc'
        from c:/ruby/lib/ruby/gems/1.8/gems/delayed_job-2.0.3/lib/delayed/command.rb:71:in `run_process'
        from c:/ruby/lib/ruby/gems/1.8/gems/delayed_job-2.0.3/lib/delayed/command.rb:65:in `daemonize'
        from c:/ruby/lib/ruby/gems/1.8/gems/delayed_job-2.0.3/lib/delayed/command.rb:63:in `times'
        from c:/ruby/lib/ruby/gems/1.8/gems/delayed_job-2.0.3/lib/delayed/command.rb:63:in `daemonize'
        from script/delayed_job:5

Is there any solution to solve out this problem?? it's working fine with ruby script/delayed_job run.

+2  A: 

The error is telling you that the Daemons gem used by Delayed Job does not work on Windows, because there is no fork API in Windows (fork is a UNIX/Linux system call). You need to switch to a background processing library that is compatible with Windows, or switch to Linux or Mac OS X for your Rails development.

John Topley
But ruby script/delayed_job run is working fine.
krunal shah
A: 

Hello,

Instead of doing rake jobs:work you can manually start it in a separate prompt: ruby script/delayed_job

There is no forking to the background there, since you're invoking the script directly.

Hope that Helps.

Luis Lavena
A: 

Does anyone have suggestions for an alternative background processing library compatible with Windows that I can use with Delay_Job? Or is it best just to use something else?

Nate Bird