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

Automatically select first installed version as global

Open sunkup opened this issue 7 years ago • 3 comments

How about automatically selecting the first installed ruby version as global, so the first time setup becomes even easier?

Many people seem to forget that.

sunkup avatar Jun 11 '18 14:06 sunkup

Personally, that would conflict with my usage of rbenv and nodenv. I keep my system ruby and system node up to date with homebrew, so "system" is always the latest version. I use rbenv and nodenv to have pinned versions for projects. In my usage, automatically selecting the first installed version would be quite counter productive, as not only would it obscure my system ruby/node, it would be pinned to (eventually) the oldest runtime on my system.

jasonkarns avatar Nov 13 '18 12:11 jasonkarns

hmm yeah, no chance then.

sunkup avatar Nov 13 '18 16:11 sunkup

Reopening to reconsider this per https://github.com/rbenv/rbenv/issues/1424

@jasonkarns I wouldn't automatically select the newly installed version to keep backwards compatibility, but upon installing the first Ruby version using rbenv and if no global version is already selected, do you think rbenv install could at least print a suggestion to run rbenv global <VERSION>, since I presume most people will want to do that to avoid accidentally trying to install gems into the system version?

mislav avatar Sep 14 '22 12:09 mislav

Fixed in https://github.com/rbenv/ruby-build/pull/2052

mislav avatar Nov 16 '22 17:11 mislav