【发布时间】:2012-01-22 19:23:38
【问题描述】:
我正在运行一个 JRUBY 应用程序。偶然发现了一个叫做工头的伟大宝石: 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
这很遗憾,因为我喜欢经营 Foreman 的想法。有谁知道上述问题的解决方法,或者在 JRUBY 环境中运行的替代方法
【问题讨论】:
-
如果您想修补工头,使用 Spoon gem 可能是一个不错的选择。