-
-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid an installation if the requested ruby is already installed #266
Comments
There is a |
@ferrarimarco Sometimes folk build the same version once again but differently. |
@postmodern I didn't notice the flag. Is there any documentation? Maybe it could be useful to have a --force-reinstall flag and the --no-reinstall be the default, like other package managers do, like pip for example. @havenwood I think it's a bad practice so it should not be encouraged. |
@ferrarimarco What's bad practice about rebuilding the same version with different build options? Say for example you want to rebuild 2.3.0 with tail call optimization or whatever else? |
@havenwood I misunderstood your first answer. This is a perfectly fine use case. |
I came to this thread because I was surprised to find that I wrote a Fish function this morning that checks the current Ruby version against the latest stable builds as reported by ruby-install, and then calls ruby-install with some hard-coded defaults and updates ~/.ruby-version with the latest C Ruby. This is probably not what everyone wants, so I'm not proposing it as a solution. I'm just suggesting that a recompilation of an existing Ruby by default is not what most people intend when they "upgrade." Even if nothing else changes, I think "--reinstall" or "--recompile" should be non-default options, while "--no-reinstall" should be the default behavior. Especially when upgrading libraries, a deliberate recompile can make sense, but reinstalling from scratch by default wastes CPU cycles that likely aren't intended. Just my $0.02 regarding my own personal experience; other use cases may vary. |
If it’s an option, I think not reinstalling should be the default behavior. A reinstall or rebuild flag could enable recompiling when someone really wants to make changes such as rebuilding with YJIT enabled/disabled. I doubt rebuilding is what most people intend as the default use case when running a bare install, though, unless Ruby-install is caching build options and detects a change. |
Should |
Currently I am running
ruby-install ruby x.x.x
to install Ruby as a non privileged user.If I run the same command again with the same user, ruby-install does not check if the package is already installed, but installs it one more time, leading to a waste of time.
The text was updated successfully, but these errors were encountered: