Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

rbenv

install

sudo pacman -S rbenv
yay -S --noconfirm ruby-build
# git clone --depth=1 https://github.com/rbenv/ruby-build "$(rbenv root)"/plugins/ruby-build

rbenv for Windows

$env:HOME = "C:\Users\User"
$env:RBENV_ROOT = "$env:HOME\Usr\Lib\rbenv"
iwr -useb "https://github.com/RubyMetric/rbenv-for-windows/raw/main/tool/install.ps1" | iex
$env:RBENV_USE_MIRROR = "CN"
& "$ENV:RBENV_ROOT\rbenv\bin\rbenv.ps1" init
  1. Set variable RBENV_ROOT=C:\Users\User\Usr\Lib\rbenv.
  2. Add %RBENV_ROOT%\rbenv\bin, %RBENV_ROOT%\shims into PATH.

usage

rbenv install <version>