获取此错误。
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有没有解决这个问题的办法?它在ruby脚本/delayed_job run中运行得很好。
发布于 2010-06-17 00:08:01
该错误告诉您延迟作业使用的守护进程gem不能在Windows上工作,因为Windows中没有UNIX API (fork是一个fork /Linux系统调用)。您需要切换到与Windows兼容的后台处理库,或者切换到Linux或Mac来进行Rails开发。
发布于 2010-06-17 04:15:41
您可以在单独的提示符中手动启动它,而不是执行rake jobs:work:ruby script/delayed_job
这里没有对后台的分支,因为您是直接调用脚本。
希望这能有所帮助。
https://stackoverflow.com/questions/3054968
复制相似问题