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 #21

Closed
sobrinho opened this issue Jul 20, 2012 · 7 comments
Closed

JRuby support #21

sobrinho opened this issue Jul 20, 2012 · 7 comments

Comments

@sobrinho
Copy link

I didn't checked the source yet but fork isn't supported by jruby:

$ rbenv rehash
NotImplementedError: fork is not available on this platform
        fork at org/jruby/RubyProcess.java:965
  __ensure__ at /Users/sobrinho/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:133
    gemspecs at /Users/sobrinho/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:129
      rehash at /Users/sobrinho/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:246
        open at org/jruby/RubyIO.java:1139
        open at /Users/sobrinho/.rbenv/versions/jruby-1.6.7.2/lib/ruby/1.9/pathname.rb:829
      rehash at /Users/sobrinho/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:245
        each at org/jruby/RubyHash.java:1186
      rehash at /Users/sobrinho/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:226
        open at org/jruby/RubyIO.java:1139
        open at /Users/sobrinho/.rbenv/versions/jruby-1.6.7.2/lib/ruby/1.9/pathname.rb:829
      rehash at /Users/sobrinho/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:225
      (root) at /Users/sobrinho/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:410
@carsomyr
Copy link
Owner

What rbenv Rubies have been installed? In particular, what does
~/.rbenv/plugins/bundler/share/rbenv/bundler/ruby_profiles.yml look like?

@sobrinho
Copy link
Author

  1.9.3-p194
* jruby-1.6.7.2 (set by /Users/sobrinho/.rbenv/version)
  ree-1.8.7-2012.02

:)

@carsomyr
Copy link
Owner

Thanks for the rbenv versions dump. Would you mind dumping ~/.rbenv/plugins/bundler/share/rbenv/bundler/ruby_profiles.yml too? The reason I ask is that the rehash.rb script attempts to exec a suitable Ruby, and JRuby is automatically disqualified for not supporting fork.

@sobrinho
Copy link
Author

---
1.9.3-p194: !ruby/object:OpenStruct
  table:
    :ruby_version:
    - 1
    - 9
    - 3
    :gem_dir: !ruby/object:Pathname
      path: /Users/sobrinho/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1
    :gem_ruby_engine: ruby
    :gem_ruby_version: 1.9.1
jruby-1.6.7.2: !ruby/object:OpenStruct
  table:
    :ruby_version:
    - 1
    - 9
    - 2
    :gem_dir: !ruby/object:Pathname
      path: /Users/sobrinho/.rbenv/versions/jruby-1.6.7.2/lib/ruby/gems/1.8
    :gem_ruby_engine: jruby
    :gem_ruby_version: '1.9'
ree-1.8.7-2012.02: !ruby/object:OpenStruct
  table:
    :ruby_version:
    - 1
    - 8
    - 7
    :gem_dir: !ruby/object:Pathname
      path: /Users/sobrinho/.rbenv/versions/ree-1.8.7-2012.02/lib/ruby/gems/1.8
    :gem_ruby_engine: ruby
    :gem_ruby_version: '1.8'
system: !ruby/object:OpenStruct
  table:
    :ruby_version:
    - 1
    - 8
    - 7
    :gem_dir: !ruby/object:Pathname
      path: /Library/Ruby/Gems/1.8
    :gem_ruby_engine: ruby
    :gem_ruby_version: '1.8'

@carsomyr this helps? :)

@carsomyr
Copy link
Owner

Interesting... My jruby-1.6.7.2 is showing 1.8.7 compatibility. How did you pull off 1.9.2 compatibility? Is it a special build flag or the presence of Java 7?

carsomyr added a commit that referenced this issue Jul 22, 2012
…er claims JRuby 1.9.x as capable when it's not (lack of Kernel.fork)

This should resolve issue #21.
@carsomyr
Copy link
Owner

I believe that your problem is fixed. Let me know if you get the same error.

@sobrinho
Copy link
Author

@carsomyr I'm using a .jrubyrb file containing that:

compat.version=1.9

This makes jruby 1.9 compatible by default ;)

Your last commit fixed the issue, thanks!

jerrycattell pushed a commit to pulseenergy/rbenv-bundler that referenced this issue Sep 28, 2012
…er claims JRuby 1.9.x as capable when it's not (lack of Kernel.fork)

This should resolve issue carsomyr#21.
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