Install rbenv/rbenv + rbenv-build/ruby-build (and other plugins), updating all of them when you want to!
It's the standard way: installs rbenv
in $HOME/.rbenv (default
$RBENV_ROOT value).
curl -L https://raw.githubusercontent.com/madumlao/rbenv-installer/master/bin/rbenv-installer \
| bash
The script will then instruct you to edit your shell initialization files.
If you prefer to install rbenv
in other directory (i.e
$HOME/myrbenv
), or perhaps system-wide (i.e. /usr/local/bin/rbenv
),
it's easy: just set $RBENV_ROOT before the installer command:
# $HOME/myrbenv
curl -L https://raw.githubusercontent.com/madumlao/rbenv-installer/master/bin/rbenv-installer \
| RBENV_ROOT=$HOME/myrbenv bash
# /usr/local/bin/rbenv
curl -L https://raw.githubusercontent.com/madumlao/rbenv-installer/master/bin/rbenv-installer \
| RBENV_ROOT=/usr/local/bin/rbenv bash
Note: depends on the path, you will need superuser (sudo) permission. Feel free to ask if you need some help!
- rbenv/ruby-build: allows
rbenv install
- rbenv/rbenv-vars: allows per-project
.rbenv-vars
files - tpope/rbenv-aliases: provides aliases for ruby versions
- madumlao/rbenv-binstubs: allows per-project binstubs
rm -rf $(rbenv root)
Inspired by phpenv-installer which was ironically inspired by a defunct version of rbenv-installer and pyenv-installer