ruby-install icon indicating copy to clipboard operation
ruby-install copied to clipboard

MRI 3.0.4

Open jrochkind opened this issue 2 years ago • 5 comments

MRI 3.0.4 does not seem to be available via ruby-install?

$ ruby-install --version
ruby-install: 0.8.3

$ ruby-install
Stable ruby versions:
  ruby:
    2.6.9
    2.7.5
    3.0.3
    3.1.1
  jruby:
    9.3.4.0
  rbx:
    5.0
  truffleruby:
    22.1.0
  truffleruby-graalvm:
    22.1.0
  mruby:
    3.0.0

3.0.4 has been out about two weeks, with security updates. https://www.ruby-lang.org/en/news/2022/04/12/ruby-3-0-4-released/

jrochkind avatar Apr 28 '22 20:04 jrochkind

Try ruby-install --latest ruby which should auto-update the versions/checksums. I plan on adding an --update or --sync option that's a little more explicit.

postmodern avatar Apr 28 '22 21:04 postmodern

Thanks. I am still pretty confused about what's going on, but for others who might arrive here:

just to find out what the latest versions of ruby that could be installed is, ruby-install --latest. ruby-install --latest ruby will actually install the latest ruby.

After running ruby-install --latest, running ruby-install again without args now shows 3.0.4, I guess the --latest flag was needed to update the local knowledge of versions.

I think the issue is not just what the commands are called, but the README which says simply:

List supported Rubies and their major versions:

 $ ruby-install

List the latest versions:

$ ruby-install --latest

Both of these commands in fact produce output in the same format. I find the docs somewhat unclear as to the relation between those command, suggesting that one lists "major versions" and the other "latest versions" isn't quite right I think?

Is it that --latest will actually go to the network to update the local records on versions available, in a way that is "sticky"? Is that right?

If so, perhaps just changing the README to say "Update the list of latest versions" before ruby-install --latest would be helpful.

jrochkind avatar Apr 28 '22 21:04 jrochkind

--latest (soon to be renamed to --update) simply updates the stable.txt version file (which lists the current stable versions which are available) and versions.txt (which lists all known versions), and the checksums for any released files, then proceeds executing. So running ruby-install --latest is the same as running just ruby-install without any arguments, except it updates the various version files before listing current stable versions. Running ruby-install --latest ruby updates the version/checksums files before attempting to resolve and install the current stable version of ruby. Running ruby-install --latest ruby-X.Y.Z will update the versions/checksums files before attempting to install ruby-X.Y.Z.

I think renaming --latest to --update (but maybe print a deprecation warning if a user still uses --latest) might make it more clear that --update causes an action to be performed.

postmodern avatar May 01 '22 22:05 postmodern

Going to update the README to this:

List supported Rubies and their current stable versions:

    $ ruby-install

Updates then list the supported Rubies and their current stable versions:

    $ ruby-install --latest

Putting emphasis on update, current, and stable (as opposed to latest version which could be a pre-release or rc).

postmodern avatar May 01 '22 22:05 postmodern

Thanks! I like the name change, I also think even with current names just updating the README for the --latest example to use the word "update" would be helpful! Perhaps "Update and then list the latest versions for supported Rubies".

Perhaps also a line elsewhere in the README around "Supports downloading the latest versions and checksums", or "Does not require updating", "(run --latest to update list of versions)".

jrochkind avatar May 01 '22 22:05 jrochkind

ruby-install 0.9.0 will now recommend using --update, and if the given ruby version is unknown then ruby-install will auto-download new versions.

postmodern avatar Jan 24 '23 02:01 postmodern