Auto-run `--latest` when `install` doesn't find a version
Expected
When I run ruby-install 2.5.0, I expect ruby 2.5.0 to install.
Actual
Instead, I get !!! Unknown ruby: 2.5.0.
Suggestion
Instead of requiring the user to run ruby-install --latest or ruby-install --latest ruby-2.5.0, I wish that ruby-install would auto-run ruby-install --latest when a version is requested but not found.
The Ruby engine, like "ruby" or "jruby", is expected before the version. It corresponds with RUBY_ENGINE. You can ruby-install --latest ruby-2.5.0 or ruby-install --latest ruby 2.5.0.
@havenwood Oh, I'm sorry. I didn't do a good job explaining myself.
I understand how it does work now. (I mistyped my issue above.)
What I'm suggesting / requesting is that when a user tries to install a version of a Ruby that ruby-install doesn't know about yet, then ruby-install should automatically run ruby-install --latest to update its list of known Ruby versions. For example:
ruby-install ruby-2.5.1
Currently: !!! Unknown ruby: 2.5.0
Suggested: ruby-install --latest && ruby-install ruby-2.5.1 gets run.
Some way of only going online to fetch a new version list if the requested version is unknown would be nice.
I'll take this on for 0.9.0. Will need to add some messy logic to check the version once, if not found update, then check again, if still not found exit with an error.
I added additional logic check in bbc327d80f094a8b24c446ca36da7b60d9579fb8 to also download the version files if the ruby version is not yet known. Will be released in 0.9.0.