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

using rbenv on macos does have mjruby binary after install #19

Open
mkristian opened this issue Dec 4, 2015 · 4 comments
Open

using rbenv on macos does have mjruby binary after install #19

mkristian opened this issue Dec 4, 2015 · 4 comments

Comments

@mkristian
Copy link

after gem install mjruby I get the following

$ gem content mjruby
/Users/cmeier/.rbenv/versions/jruby-9.0.3.0/lib/ruby/gems/shared/gems/mjruby-0.5.2-java/Makefile
/Users/cmeier/.rbenv/versions/jruby-9.0.3.0/lib/ruby/gems/shared/gems/mjruby-0.5.2-java/extconf.rb
/Users/cmeier/.rbenv/versions/jruby-9.0.3.0/lib/ruby/gems/shared/gems/mjruby-0.5.2-java/make.bat
/Users/cmeier/.rbenv/versions/jruby-9.0.3.0/lib/ruby/gems/shared/gems/mjruby-0.5.2-java/mruby/build/i386-apple-darwin14/bin/mjruby
/Users/cmeier/.rbenv/versions/jruby-9.0.3.0/lib/ruby/gems/shared/gems/mjruby-0.5.2-java/mruby/build/i686-pc-freebsd7/bin/mjruby
/Users/cmeier/.rbenv/versions/jruby-9.0.3.0/lib/ruby/gems/shared/gems/mjruby-0.5.2-java/mruby/build/i686-pc-linux-gnu/bin/mjruby
/Users/cmeier/.rbenv/versions/jruby-9.0.3.0/lib/ruby/gems/shared/gems/mjruby-0.5.2-java/mruby/build/i686-w64-mingw32/bin/mjruby.exe
/Users/cmeier/.rbenv/versions/jruby-9.0.3.0/lib/ruby/gems/shared/gems/mjruby-0.5.2-java/mruby/build/x86_64-apple-darwin14/bin/mjruby
/Users/cmeier/.rbenv/versions/jruby-9.0.3.0/lib/ruby/gems/shared/gems/mjruby-0.5.2-java/mruby/build/x86_64-pc-freebsd7/bin/mjruby
/Users/cmeier/.rbenv/versions/jruby-9.0.3.0/lib/ruby/gems/shared/gems/mjruby-0.5.2-java/mruby/build/x86_64-pc-linux-gnu/bin/mjruby
/Users/cmeier/.rbenv/versions/jruby-9.0.3.0/lib/ruby/gems/shared/gems/mjruby-0.5.2-java/mruby/build/x86_64-w64-mingw32/bin/mjruby.exe

and running the right executable directly:

$ /Users/cmeier/.rbenv/versions/jruby-9.0.3.0/lib/ruby/gems/shared/gems/mjruby-0.5.2-java/mruby/build/i386-apple-darwin14/bin/mjruby
RuntimeError: JRUBY_HOME directory is malformed: no lib directory found!

maybe I did something utterly wrong not sure.

@jkutner
Copy link
Owner

jkutner commented Feb 9, 2016

What happened when you ran just mjruby?

The mjruby executable needs to be in the JRUBY_HOME/bin dir, so running it from the Gem contents won't work.

Maybe there was a problem because rbenv uses shims, and the Gem tries to install the mjruby executable alongside the shim instead of in the JRUBY_HOME dir?

@jkutner
Copy link
Owner

jkutner commented Feb 9, 2016

I was able to get this working like so:

$ rbenv versions
* jruby-9.0.5.0 (set by RBENV_VERSION environment variable)

$ jruby -v
jruby 9.0.5.0 (2.2.3) 2016-01-26 7bee00d OpenJDK 64-Bit Server VM 24.91-b01 on 1.7.0_91-b02 +jit [linux-amd64]

$ jgem install mjruby
Building native extensions.  This could take a while...
Successfully installed mjruby-0.5.2-java
1 gem installed

$ rbenv rehash

$ mjruby -v
jruby 9.0.5.0 (2.2.3) 2016-01-26 7bee00d OpenJDK 64-Bit Server VM 24.91-b01 on 1.7.0_91-b02 +jit [linux-amd64]

I don't think there is a way to force rehash after the Gem is installed, so I may have to leave this one the way it is.

@rebelwarrior
Copy link

That worked for me on rbenv.

Sent from my mobile.

On Feb 9, 2016, at 3:41 PM, Joe Kutner [email protected] wrote:

I was able to get this working like so:

$ rbenv versions

  • jruby-9.0.5.0 (set by RBENV_VERSION environment variable)

$ jruby -v
jruby 9.0.5.0 (2.2.3) 2016-01-26 7bee00d OpenJDK 64-Bit Server VM 24.91-b01 on 1.7.0_91-b02 +jit [linux-amd64]

$ jgem install mjruby
Building native extensions. This could take a while...
Successfully installed mjruby-0.5.2-java
1 gem installed

$ rbenv rehash

$ mjruby -v
jruby 9.0.5.0 (2.2.3) 2016-01-26 7bee00d OpenJDK 64-Bit Server VM 24.91-b01 on 1.7.0_91-b02 +jit [linux-amd64]
I don't think there is a way to force rehash after the Gem is installed, so I may have to leave this one the way it is.


Reply to this email directly or view it on GitHub.

@rebelwarrior
Copy link

Now with 9.1.8.0 It is not working again. It can't find the executable, when I find it in the gem directory and execute it I get this:

bin % ./mjruby -S pry
RuntimeError: JRUBY_HOME directory is malformed: no lib directory found!

Not sure what todo. JRUBY_HOME is not defined, btw.

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