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

Failure to RVM-install JRuby 9.2.{13,17},0 on Ubuntu 20 with JDK 8 #6689

Closed
thbar opened this issue May 27, 2021 · 9 comments
Closed

Failure to RVM-install JRuby 9.2.{13,17},0 on Ubuntu 20 with JDK 8 #6689

thbar opened this issue May 27, 2021 · 9 comments

Comments

@thbar
Copy link
Contributor

thbar commented May 27, 2021

This is a follow-up of this twitter thread and this RVM issue.

I have managed to create a small reproduction with full logs here, using Vagrant:

https://github.com/thbar/jruby-rvm-ubuntu-focal-repro

I think JRuby 9.2.17.0 had a fix for this, but something is still not working.

Happy to help out further!

@thbar
Copy link
Contributor Author

thbar commented May 28, 2021

A quick search in the logs shows:

Successfully installed jruby-launcher-1.1.15-java

So apparently the latest launcher available is installed.

@thbar
Copy link
Contributor Author

thbar commented Jun 2, 2021

@headius not sure how I can help further here ; I'm allowed to use a couple of client hours to dive further into it if you have a bit of guidance, so hit me up if you have any hint!

@headius
Copy link
Member

headius commented Jun 3, 2021

Nice repro! I will give it a try.

@headius headius added this to the JRuby 9.2.18.0 milestone Jun 3, 2021
@headius
Copy link
Member

headius commented Jun 3, 2021

I believe I have located the missing logic in the native launcher: 8c75937

This piece of code ensures that a symlinked 'java' command gets resolved back to a real binary, which should be the one that lives in a real JAVA_HOME. This logic has never made it over to the native launcher.

I will file an issue at https://github.com/jruby/jruby-launcher to get this ported and released. We will incorporate the updated Windows .exe in 9.2.18.0.

The simplest workaround for you would be to set JAVA_HOME to a real JDK install (which will cause us to bypass the bad detection logic). In Debian-based systems like Ubuntu, that would be somewhere under /usr/lib/jvm.

Edit: fixed url

@thbar
Copy link
Contributor Author

thbar commented Jun 3, 2021

Thanks! To make sure I understand the possibilities: I either use the work-around for immediate fix, or wait for JRuby 9.2.18.0 to be out, is that correct?

(thanks for both options, much appreciated!)

@headius
Copy link
Member

headius commented Jun 4, 2021

@thbar Once I have fixed and released a new jruby-launcher, rvm may just work. I don't think it tries to install a specific version.

If for some reason it doesn't pick up the new jruby-launcher, then the workaround would be necessary.

@headius
Copy link
Member

headius commented Jun 4, 2021

...and the fixed Windows executable will be bundled with JRuby 9.2.18.0, but that doesn't affect you (and this bug does not affect Windows).

@headius
Copy link
Member

headius commented Jun 4, 2021

I have pushed jruby-launcher 1.1.16 and confirmed that rvm was able to (re)install JRuby 9.2.17.0 using your Vagrant example. Please confirm!

@thbar
Copy link
Contributor Author

thbar commented Jun 4, 2021

@headius thanks for the quick turn-around!

I don't think it tries to install a specific version.

Indeed it installs the latest available version.

I have pushed jruby-launcher 1.1.16 and confirmed that rvm was able to (re)install JRuby 9.2.17.0 using your Vagrant example. Please confirm!

I am now able to use JDK 8 and can confirm everything works as expected.

Many thanks for your excellent work!

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