Jruby - 工头 Gem 未运行
我正在运行 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 环境中运行的替代方案
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
感谢这个 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
另外几个选项是 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/