asdf-vm / asdf-ruby

Ruby plugin for asdf version manager
https://github.com/asdf-vm/asdf
MIT License
668 stars 134 forks source link

auto-reshim works wrong with jruby and ruby 2.7.0-preview1 #124

Open hurricup opened 5 years ago

hurricup commented 5 years ago

The problem is in https://github.com/asdf-vm/asdf-ruby/blob/master/rubygems-plugin/rubygems_plugin.rb script. Namely, you are using asdf reshim ruby #{RUBY_VERSION} bin/#{executable} and this is incorrect for jruby, because RUBY_VERSION returns equal mri ruby version. E.g. for jruby 9.2.6.0, it returns 2.5.3. And you are trying to reshim for ruby 2.5.3 I could not find how to properly obtain jruby distribution id from asdf, there is no environment variable or something, so can't make a PR. But this should not be a problem for developers.

hurricup commented 5 years ago

For the same reason auto-reshim for ruby-2.7.0-preview1 doesn't work