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 support #119

Open
brauliobo opened this issue Jan 8, 2018 · 3 comments
Open

JRuby support #119

brauliobo opened this issue Jan 8, 2018 · 3 comments

Comments

@brauliobo
Copy link

~/P/retirement ❯❯❯ rerun --dir config --pattern '{*,.*}' bin/daemon                                                                                     master ✱
19:21:48 [rerun] Retirement launched
NotImplementedError: fork is not available on this platform
          fork at org/jruby/RubyKernel.java:1736
         start at /home/braulio/.rvm/gems/jruby-9.1.13.0/gems/rerun-0.11.0/lib/rerun/runner.rb:152
  keep_running at /home/braulio/.rvm/gems/jruby-9.1.13.0/gems/rerun-0.11.0/lib/rerun/runner.rb:9
        <main> at /home/braulio/.rvm/gems/jruby-9.1.13.0/gems/rerun-0.11.0/bin/rerun:12
          load at org/jruby/RubyKernel.java:973
        <eval> at /home/braulio/.rvm/gems/jruby-9.1.13.0/bin/rerun:1
          eval at org/jruby/RubyKernel.java:994
        <main> at /home/braulio/.rvm/gems/jruby-9.1.13.0/bin/jruby_executable_hooks:15
@brauliobo brauliobo changed the title Support JRuby JRuby support Jan 8, 2018
@alexch
Copy link
Owner

alexch commented Jan 24, 2018

I don't know much about JRuby, but if it doesn't support fork then I doubt there's much rerun can do. Fortunately, rerun is independent from your own JRuby app; you can install multiple versions of ruby on the same system and use one for rerun and the other for your own app(s). I see you're using rvm so I bet there's a way to ask it to run rerun with an MRI Ruby, something like

rvm 2.3.2 do rerun --dir config --pattern '{*,.*}' bin/daemon

(Assuming you have a ruby 2.3.2 in your rvm list.)

Please let me know how this goes.

@brauliobo
Copy link
Author

Why a fork is needed to execute a separate process? Isn't a thread with Process.wait enough?

@alexch
Copy link
Owner

alexch commented Jan 25, 2018

Oh wait, v0.11 was before we switched from fork/exec to spawn. Can you try with the newly-released v0,12?

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

2 participants