delayed_job gem- notimplementederror:叉子在此平台上不可用



我正在使用jruby(1.7.3或1.7.9),delayed_job(1.8.4),守护程序(1.1.9)Gems for My Rails 2.3.17应用程序。

我正在尝试使用命令启动延迟的作业服务器:1. jruby脚本/delayed_job start

错误:

RuntimeError: ObjectSpace is disabled; each_object will only work with Class, pass -X+O to enable
  each_object at org/jruby/RubyObjectSpace.java:173
    daemonize at /home/user/projects/new_central_repo/mml/mml_services/vendor/gems/delayed_job-1.8.4/lib/delayed/command.rb:39
       (root) at script/delayed_job:5
  1. 要解决此错误,我通过了" -x O"选项&运行以下命令:jruby -x o脚本/delayed_job start

这已经解决了" objectspace已禁用"错误,但是我在本地上遇到了遵循错误。错误:

NotImplementedError: fork is not available on this platform
              fork at org/jruby/RubyKernel.java:1880
          safefork at /home/user/.rvm/gems/ext-jruby-1.7.9@jruby179-rails2317/gems/daemons-1.1.9/lib/daemons/daemonize.rb:11
    call_as_daemon at /home/user/.rvm/gems/ext-jruby-1.7.9@jruby179-rails2317/gems/daemons-1.1.9/lib/daemons/daemonize.rb:43
        start_proc at /home/user/.rvm/gems/ext-jruby-1.7.9@jruby179-rails2317/gems/daemons-1.1.9/lib/daemons/application.rb:259
             start at /home/user/.rvm/gems/ext-jruby-1.7.9@jruby179-rails2317/gems/daemons-1.1.9/lib/daemons/application.rb:296
               run at /home/user/.rvm/gems/ext-jruby-1.7.9@jruby179-rails2317/gems/daemons-1.1.9/lib/daemons/controller.rb:70
          run_proc at /home/user/.rvm/gems/ext-jruby-1.7.9@jruby179-rails2317/gems/daemons-1.1.9/lib/daemons.rb:197
              call at org/jruby/RubyProc.java:290
              call at org/jruby/RubyProc.java:224
  catch_exceptions at /home/user/.rvm/gems/ext-jruby-1.7.9@jruby179-rails2317/gems/daemons-1.1.9/lib/daemons/cmdline.rb:109
          run_proc at /home/user/.rvm/gems/ext-jruby-1.7.9@jruby179-rails2317/gems/daemons-1.1.9/lib/daemons.rb:196
         daemonize at /home/user/projects/new_central_repo/mml/mml_services/vendor/gems/delayed_job-1.8.4/lib/delayed/command.rb:45
             times at org/jruby/RubyFixnum.java:280
         daemonize at /home/user/projects/new_central_repo/mml/mml_services/vendor/gems/delayed_job-1.8.4/lib/delayed/command.rb:43
            (root) at script/delayed_job:5

任何人都可以帮助我解决此错误。

在本地我可以使用" jrake作业:工作"命令启动服务器,但是我不是可以使用" jrake jobs:work"而不是" jruby script/delayed_job start"。

谢谢。

您不能在jruby上使用delayed_job,因为它依赖于jruby中不可用的叉子。

相关内容

  • 没有找到相关文章

最新更新