-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
RUBY_ENGINE_VERSION
and JRUBY_VERSION
return version with suffix SNAPSHOT
instead of dev
for a dev version
#5144
Comments
Not sure, maybe it should be fixed in https://github.com/rbenv/ruby-build |
@bogdanvlviv Thanks for the report! I think this is something we should tidy up soon, but obviously it only affects head builds. We'll be putting out 9.2 within the next week (🤞) but we always want it to be easy for folks to pull and test master HEAD builds. I pinged @mkristian about this, since I've lost track of how we do the dev vs snapshot thing...or whether we even should do the dev thing now. |
@bogdanvlviv After discussing this with @mkristian it seems like this should be fixed in ruby-build. We have not used the -dev suffix for quite some time, and all our development builds will have the -SNAPSHOT prefix standard to maven builds. ruby-build is mapping the -dev suffix to a download of the -SNAPSHOT build, which will always report RUBY_ENGINE_VERSION with the -SNAPSHOT suffix. |
Since rails#30016 Rails generates `.ruby-version` file in order to help Ruby version manager tools like `rbenv`, `rvm` determine which Ruby version should be used for the current Rails project. Since rails#32649 Rails sets Ruby version to the file compatible with MRI/JRuby by default. Pull Request rails#31496 reports that `.ruby-version` doesn't match ruby version other than stable version and recommends to use `ENV["RBENV_VERSION"]`, and `ENV["rvm_ruby_string"]` in order to set correct Ruby version to the file that `rbenv` or `rvm` can understand. Also, there is another similar issue that reports the same case if use JRuby jruby/jruby#5144. Closes rails#31496, jruby/jruby#5144.
@headius After investigation of this issue, I've realized that it is Rails issue. |
Environment
JRuby: jruby-9.2.0.0-dev
rbenv.
Recently we patched Rails in order to create the
.ruby-version
compatible with MRI/JRuby by default. See issue rails/rails#32639.We use
RUBY_ENGINE_VERSION
(onmaster
branch, rails/rails@dc8a66a) andJRUBY_VERSION
(on5-2-stable
branch since Rails 5.2 supports Ruby 2.2 and it doesn't supportRUBY_ENGINE_VERSION
, rails/rails@f2201f1) to get JRuby version in order to write it down to generated.ruby-version
file.Actual Behavior
The problem is
RUBY_ENGINE_VERSION
,JRUBY_VERSION
return"9.2.0.0-SNAPSHOT"
instead of"9.2.0.0-dev"
under JRuby dev version.The text was updated successfully, but these errors were encountered: