Manage Ruby Versions With rbenv

Install Ruby versions and pin them per directory using .ruby-version.

macOSpackagescliversionLow risk
Run rbenv install 3.3.0 to build a Ruby version, then rbenv local 3.3.0 to pin it.

01Command

Command
$ rbenv install 3.3.0

02What it does

rbenv intercepts the ruby command and dispatches to the version selected by .ruby-version, the RBENV_VERSION variable or the global setting. It is lighter than rvm because it only shims binaries rather than overriding shell functions.

03Risk

RiskLow risk
CompatibilitymacOS with Homebrew installed
!Warning: Installing Ruby versions compiles from source unless ruby-build has a prebuilt package; expect a one-time build cost.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Homebrew formula: rbenv
    Homebrew · vendor-doc · 2026-09-20
    Evidence: Ruby version manager. Packages rbenv, a lightweight Ruby version management tool.
  • Official project documentation
    Official project · vendor-doc · 2026-09-20
    Evidence: Packages rbenv, a lightweight Ruby version management tool.

Last verified: 2026-09-22 · Category: Developer

06Related solutions