asdf-vm / asdf-vm/asdf-ruby

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

Open
#124 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
734
Forks
156
Avg merge
17h 6m
Merged PRs (30d)
1

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with rubygems-plugin/rubygems_plugin.rb and reproduce auto-reshim with JRuby 9.2.6.0 or Ruby 2.7.0-preview1. Trace how the plugin identifies the installed distribution and version, then verify that auto-reshim targets the correct JRuby installation and executable rather than the MRI version.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.