The rbenv-installer
script idempotently installs or updates rbenv on your
system. If Homebrew is detected, installation will proceed using brew install/upgrade
. Otherwise, rbenv is installed under ~/.rbenv
.
Additionally, ruby-build is also
installed if rbenv install
is not already available.
# with curl
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer | bash
# alternatively, with wget
wget -q https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer -O- | bash
After the installation, a separate rbenv-doctor
script is run to verify the
success of the installation and to detect common issues. You can run
rbenv-doctor
on your machine separately to verify the state of your install:
# with curl
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash
# alternatively, with wget
wget -q https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor -O- | bash