Skip to content

Conversation

@SalvatoreT
Copy link

Make it even easier to support migrating off other Ruby version managers.

Closes #474


Basic case

If for some (cursed) reason someone just sets a non-fully qualified version

❯ cat .ruby-version
2

it'll resolve to either the newest one you have or (if none match) the newest one that matches

❯ asdf current ruby
Name            Version         Source                                       Installed
ruby            2.7.7           /Users/sal/Developer/asdf-ruby/.ruby-version true

Non MRI Ruby

Then I set the .ruby-version to JRuby 10.

❯ cat .ruby-version
jruby-10

And it resolves to the latest one

❯ asdf current ruby
Name            Version         Source                                       Installed
ruby            jruby-10.0.2.0  /Users/sal/Developer/asdf-ruby/.ruby-version true
❯ ruby --version
jruby 10.0.2.0 (3.4.2) 2025-08-07 cba6031bd0 OpenJDK 64-Bit Server VM 25+35-3488 on 25+35-3488 +indy +jit [arm64-darwin]

Not-yet-installed Ruby

I don't yet have Ruby 3.3.x on my machine.

❯ cat .ruby-version
3.3

so if I were to install a Ruby version, I'd get 3.3.10.

❯ asdf current ruby
Name            Version         Source                                       Installed
ruby            3.3.10          /Users/sal/Developer/asdf-ruby/.ruby-version false - Run `asdf install ruby 3.3.10`

Make it even easier to support migrating off other Ruby version
managers.
@SalvatoreT
Copy link
Author

@Stratus3D, please let me know what you think!

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

Successfully merging this pull request may close these issues.

Support fuzzy matching the Ruby version for .ruby-version files

1 participant