gpt4 book ai didi

ruby-on-rails - ruby 脚本/delayed_job 启动有问题。 Windows 上的 delayed_job 和守护进程

转载 作者:数据小太阳 更新时间:2023-10-29 07:51:22 26 4
gpt4 key购买 nike

遇到这个错误。

  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 一起工作正常。

最佳答案

错误是告诉你 Delayed Job 使用的 Daemons gem 在 Windows 上不工作,因为 Windows 中没有 fork API(fork 是一个 UNIX/Linux系统调用)。您需要切换到与 Windows 兼容的后台处理库,或者切换到 Linux 或 Mac OS X 以进行 Rails 开发。

关于ruby-on-rails - ruby 脚本/delayed_job 启动有问题。 Windows 上的 delayed_job 和守护进程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3054968/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com