Jruby - 工头 Gem 未运行

发布于 2024-12-28 19:57:34 字数 2493 浏览 1 评论 0 原文

我正在运行 JRUBY 应用程序。并偶然发现了一颗名为 Foreman 的伟大宝石: https://github.com/ddollar/foreman

但是我发现 - JVM不支持分叉:

 foreman startNotImplementedError: fork is not available on this platform
              fork at org/jruby/RubyKernel.java:1657
      fork_with_io at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/process.rb:32
       run_process at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/process.rb:44
               run at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/process.rb:19
  with_environment at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/process.rb:64
               run at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/process.rb:18
             chdir at org/jruby/RubyDir.java:466
               run at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/process.rb:17
             spawn at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/procfile_entry.rb:17
               map at org/jruby/RubyArray.java:2336
             spawn at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/procfile_entry.rb:15
   spawn_processes at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/engine.rb:63
              each at org/jruby/RubyArray.java:1609
   spawn_processes at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/engine.rb:61
             start at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/engine.rb:45
             start at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/cli.rb:28
          __send__ at org/jruby/RubyBasicObject.java:1772
              send at org/jruby/RubyKernel.java:1972
               run at /home/charlie/.rvm/gems/jruby-head/gems/thor-0.14.6/lib/thor/task.rb:21
       invoke_task at /home/charlie/.rvm/gems/jruby-head/gems/thor-0.14.6/lib/thor/invocation.rb:118
          dispatch at /home/charlie/.rvm/gems/jruby-head/gems/thor-0.14.6/lib/thor.rb:263
             start at /home/charlie/.rvm/gems/jruby-head/gems/thor-0.14.6/lib/thor/base.rb:389
            (root) at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/bin/foreman:7
              load at org/jruby/RubyKernel.java:996
            (root) at /home/charlie/.rvm/gems/jruby-head/bin/foreman:19

这是一种耻辱,因为我喜欢管理福尔曼的想法。有谁知道解决上述问题的方法,或者在 JRUBY 环境中运行的替代方案

I am running a JRUBY app. And stumbled accross a great gem called Foreman:
https://github.com/ddollar/foreman

However I found out - that the JVM does not support forking:

 foreman startNotImplementedError: fork is not available on this platform
              fork at org/jruby/RubyKernel.java:1657
      fork_with_io at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/process.rb:32
       run_process at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/process.rb:44
               run at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/process.rb:19
  with_environment at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/process.rb:64
               run at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/process.rb:18
             chdir at org/jruby/RubyDir.java:466
               run at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/process.rb:17
             spawn at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/procfile_entry.rb:17
               map at org/jruby/RubyArray.java:2336
             spawn at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/procfile_entry.rb:15
   spawn_processes at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/engine.rb:63
              each at org/jruby/RubyArray.java:1609
   spawn_processes at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/engine.rb:61
             start at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/engine.rb:45
             start at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/lib/foreman/cli.rb:28
          __send__ at org/jruby/RubyBasicObject.java:1772
              send at org/jruby/RubyKernel.java:1972
               run at /home/charlie/.rvm/gems/jruby-head/gems/thor-0.14.6/lib/thor/task.rb:21
       invoke_task at /home/charlie/.rvm/gems/jruby-head/gems/thor-0.14.6/lib/thor/invocation.rb:118
          dispatch at /home/charlie/.rvm/gems/jruby-head/gems/thor-0.14.6/lib/thor.rb:263
             start at /home/charlie/.rvm/gems/jruby-head/gems/thor-0.14.6/lib/thor/base.rb:389
            (root) at /home/charlie/.rvm/gems/jruby-head/gems/foreman-0.36.1/bin/foreman:7
              load at org/jruby/RubyKernel.java:996
            (root) at /home/charlie/.rvm/gems/jruby-head/bin/foreman:19

This was a shame, as I loved the idea of running Foreman. Does anyone know a work around for the above issue, or an alternative that will run inside a JRUBY environment

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

偷得浮生 2025-01-04 19:57:34

感谢这个 gem 的创建者的出色工作,现在可以在 Jruby

https://github.com/ddollar 中使用/foreman

在 Jruby 1.6.6 中运行良好

Thanks to the awesome work of the creators of this gem, this is now available in Jruby

https://github.com/ddollar/foreman

Is running fine in Jruby 1.6.6

微暖i 2025-01-04 19:57:34

另外几个选项是 RVM 包装器和 Guard::Process,如下所述:http://www.without-brains.net/blog/2011/09/21/using-foreman-to-run-jruby-with-rvm-and-mri/

Another few options are a RVM wrapper and Guard::Process as outlined here: http://www.without-brains.net/blog/2011/09/21/using-foreman-to-run-jruby-with-rvm-and-mri/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文