Closed jrochkind closed 1 year ago
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.
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.
--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.
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).
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)".
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.
MRI 3.0.4 does not seem to be available via ruby-install?
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/