RBENV(1)
π¦ RBENV(1) β the Rbenv Manual, but make it cute π¦
okay bestie, welcome to the Rbenv Manual π this is the page that teaches you rbenv, and honestly? it's giving main character energy for your whole Ruby setup.
β¨ NAME β¨
rbenv β manage your application's Ruby environment π
πΈ SYNOPSIS πΈ
rbenv <command> [<args>...]
π DESCRIPTION π
so here's the tea β rbenv respects the .ruby-version file in a project directory, and the way it does that is by making sure that any ruby, gem, bundle, or other Ruby command invocation automatically invokes the Ruby version configured for that project. no cap. it just handles it. π«Ά
the way it pulls this off is by generating shims for all Ruby executables. as long as the rbenv shims directory is prepended to PATH, rbenv automatically ensures transparent switching between Ruby versions. literally magic, but it's just PATH bestie. πͺ
and where does it look for available Ruby versions? in the $RBENV_ROOT/versions directory. remember that. it matters. π
π COMMANDS π
rbenv global [<version>]β view or change the global Ruby version πrbenv local [<version>]β view or change the local Ruby version πrbenv shell [<version>]β view or change the Ruby version for the current shell session πrbenv versionβ view the currently active Ruby version and where it is set from πrbenv versionsβ list all locally installed Ruby versions known to rbenv πrbenv install [<version>]β (provided by theruby-buildplugin) download and install a new Ruby version π₯rbenv rehashβ regenerate shims for all known Ruby executables πrbenv which [<command>]β view the executable path that a command resolves to π§rbenv initβ help bootstrap rbenv into the current shell environment πrbenv help [<command>]β view help text for any rbenv command π
π ENVIRONMENT VARIABLES π
RBENV_VERSION(default: read from.ruby-versionfile) β the Ruby version name to be used πRBENV_ROOT(default:~/.rbenv) β the location where rbenv discovers Ruby versions, plugins, and other configuration πRBENV_DEBUGβ activates printing debug information about rbenv internals to standard error πRBENV_HOOK_PATHβ colon-separated list of paths searched for rbenv plugin scripts πͺRBENV_DIR(default:$PWD) β directory to traverse bottom-up to locate the.ruby-versionfile π§
π§ PLUGINS π§
as its core functionality, rbenv only switches between Ruby versions and does nothing else β but it offers a plugin mechanism to hook into and override almost any aspect of its default behavior. obsessed. β¨
the most common plugin for rbenv is ruby-build, which facilitates installing new Ruby versions into the $RBENV_ROOT/versions directory. π
read more at https://github.com/rbenv/rbenv/wiki/Plugins π
π NOTES π
https://github.com/rbenv/rbenv/discussionshttps://github.com/rbenv/rbenv/wikihttps://github.com/rbenv/ruby-build#readme
π AUTHOR π
Mislav MarohniΔ
ok that's the whole page bestie, you ate that π go forth and switch Ruby versions with confidence, iykyk π
and fr fr, this was rbenv 1.3.2, dated 2023-11-08, from the RBENV(1) manual page. periodt. π
π¦ where this page comes from
- arch rolling: rbenv 1.3.2-2 Β· MIT
- epel 10: rbenv 1.3.2-4.el10_3 Β· MIT
- epel 9: rbenv 1.3.2-4.el9 Β· MIT
- fedora 43: rbenv 1.3.2-2.fc43 Β· MIT
- fedora 44: rbenv 1.3.2-3.fc44 Β· MIT
- fedora 44: rbenv 1.3.2-4.fc44 Β· MIT
- nixpkgs unstable: rbenv 1.3.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms