Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JRuby + open4: 'fork is not available on this platform' #21

Open
astrostl opened this issue Mar 20, 2013 · 3 comments
Open

JRuby + open4: 'fork is not available on this platform' #21

astrostl opened this issue Mar 20, 2013 · 3 comments

Comments

@astrostl
Copy link

I was trying to make a jgem-based RPM using JRuby + https://github.com/jordansissel/fpm , and ran into this error. FPM has their own issue for it at jordansissel/fpm#268 . Would there be any reasonable way for open4 to navigate around JRuby's (the JVM's) fork limitation?

@nandosola
Copy link

Same thing happens with Vlad (The Deployer):

coruscant:fileserver nando$ REMOTE_IP=192.168.42.166 rake vlad:setup --trace
** Invoke vlad:setup (first_time)
** Execute vlad:setup
** Invoke vlad:setup_app (first_time)
** Execute vlad:setup_app
ssh deployer@192.168.42.166 'mkdir -p /var/apps/trantor-fileserver /var/apps/trantor-fileserver/releases /var/apps/t
rantor-fileserver/shared /var/apps/trantor-fileserver/scm /var/apps/trantor-fileserver/shared/log /var/apps/trantor-
fileserver/shared/system /var/apps/trantor-fileserver/shared/pids'
rake aborted!
fork is not available on this platform
org/jruby/RubyKernel.java:1749:in `fork'
/Users/nando/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/open4-1.3.0/lib/open4.rb:58:in `do_popen'
/Users/nando/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/open4-1.3.0/lib/open4.rb:30:in `popen4'
/Users/nando/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/rake-remote_task-2.2.1/lib/rake/remote_task.rb:19
1:in `run'
(eval):1:in `run'
/Users/nando/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/vlad-2.4.1/lib/vlad/core.rb:58:in `(root)'
org/jruby/RubyProc.java:249:in `call'
/Users/nando/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/rake-remote_task-2.2.1/lib/rake/remote_task.rb:68
7:in `execute'
Tasks: TOP => vlad:setup_app

open4 is a runtime dependency of rake-remote_task, which is required by vlad

@nandosola
Copy link

A possible solution is detailed here:

seattlerb/rake-remote_task#11

@r4um
Copy link

r4um commented Apr 1, 2013

spoon looks like a good alternative to use instead of fork directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants