rbenv / ruby-build

A tool to download, compile, and install Ruby on Unix-like systems.
https://rbenv.org/man/ruby-build.1
MIT License
3.89k stars 785 forks source link

Add -d, --dir option to install to <prefix>/<definition> instead of <prefix> #2447

Closed eregon closed 1 month ago

eregon commented 2 months ago

So this enables for example:

$ ruby-build -d truffleruby+graalvm-24.1.0 ~/.rubies
...
==> Installed truffleruby+graalvm-24.1.0 to /home/eregon/.rubies/truffleruby+graalvm-24.1.0

Which I find quite convenient compared to having to copy-paste the definition names after the rubies directory.

mislav commented 2 months ago

BTW, what do you think about this potential feature being lumped in with all the others, while we're going in this direction:

ruby-build truffleruby+graalvm -d ~/.rubies
#=> (installs the latest "truffleruby+graalvm" version)
eregon commented 2 months ago

BTW, what do you think about this potential feature being lumped in with all the others, while we're going in this direction:

It seems nice to have but that feels out of scope and I don't really have time to look into that. I don't really need it either. There is also the question for CRuby if e.g. ruby-build 3.3 $PREFIX should work, etc.

eregon commented 1 month ago

Thank you!