Missing Ruby Version on ASDF
Asked Answered
E

2

24

I am trying to install Ruby 2.7.7 via asdf but the latest version appears to be 2.7.6. Anyone happen to know how to support a new Ruby version on asdf?

Available Ruby 2.7.x versions

Tried installing Ruby 2.7.7, expected version to be available.

Epizoic answered 5/12, 2022 at 18:9 Comment(1)
Per the plugin docs: "Under the hood, asdf-ruby uses ruby-build to build and install Ruby, check its README for more information about build options and the troubleshooting wiki section for any issues encountered during installation of ruby versions.". Have you tried upgrading ruby-build as shown Here?Gon
B
53

The asdf-ruby plugin uses ruby-build to actually build Ruby versions. To be able to install new Ruby versions, ruby-build needs to be updated.

You can set the desired ruby-build version by setting the ASDF_RUBY_BUILD_VERSION environment variable to the desired version before invoking asdf.

Alternatively, you can also update your asdf-ruby plugin to use the current ruby-build version on every invocation as they have updated the plugin to use the current ruby-build version by default in asdf-vm/asdf-ruby#317.

This can be done with either

asdf plugin update --all

or

asdf plugin update ruby

to just update the ruby plugin.

Brewing answered 5/12, 2022 at 19:39 Comment(3)
Updating ruby-build worked! Thank you.Epizoic
@Epizoic Thanks. And for posterity, the way to update ruby build on mac w/ homebrew is brew upgrade ruby-buildSwish
@Swish asdf-ruby uses its own internal ruby-build version. As such, with asdf-ruby, updating your homebrew installed ruby-build tool does not solve the issue at hand. In fact, when using asfd-ruby, the authors recommend to uninstall all other ruby version managers when using it (which includes a globally installed ruby-build).Brewing
C
0

If asdf plugin update --all / asdf plugin update ruby doesn't work for you it means the ruby version is missing from ruby-build.

You can probably either comment on the issue or open an issue on:

https://github.com/rbenv/ruby-build/issues

Chrysoberyl answered 27/1 at 10:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.