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

Environment variable for source directory location

Open lgw4 opened this issue 11 years ago • 5 comments

Would it be possible to have an environment variable to set the source directory (analogous to the RUBIES environment variable in chruby)?

lgw4 avatar Oct 24 '14 03:10 lgw4

I'm not sure a canonical one exists?

postmodern avatar Oct 27 '14 20:10 postmodern

@postmodern, if there's a way for users to suggest a default installation location, it makes it much easier to use ruby-install with a Ruby version manager like rbenv without having to use the same command arguments over and over again. In our company dotfiles we've suggested a wrapper around ruby-install, but since most users would install all their Rubies in one place, being able to establish a location through an environment variable or rc file that ruby-install reads would be a great convenience.

geoffharcourt avatar Dec 26 '15 16:12 geoffharcourt

I want to keep additional env variables to a minimum. I've been meaning to write a plugin for rbenv but never got around to it. The only problem is that rbenv omits the ruby- prefix for MRI. For MRI you'd need to resolve the fully qualified version and set --install-dir to ~/.rbenv/versions/X.Y.Z. --rubies-dir ~/.rbenv/versions would be sufficient for rbx, jruby, etc.

postmodern avatar Dec 27 '15 05:12 postmodern

I'm thinking about ~/.local/src. Not sure about being canonical, though.

FranklinYu avatar Aug 08 '17 22:08 FranklinYu