# rbenv

> Manage your app's Ruby environment

- Type: agent or tool
- Field: System & Self-hosted
- Repository: https://github.com/rbenv/rbenv
- GitHub stars: 16737
- Licence: MIT
- Language: Shell
- Last push: 2026-07-14
- Page: https://imutechz.in/agents/rbenv

## What it is
rbenv is a version manager for the Ruby programming language on Unix-like systems. It lets you switch between multiple installed Ruby versions on one machine and keeps each project on the version it expects. It works by injecting itself into your PATH, then reading a .ruby-version file in the current directory to pick the Ruby version from those installed under /.rbenv/versions/.

## Features
- Switches Ruby versions per project via a .ruby-version file
- Hooks into your shell PATH so ruby, gem and bundler use the selected version
- Stores installed Ruby versions under /.rbenv/versions/
- Almost every part is customizable through bash plugins
- Shell completions for bash and zsh
- rbenv install is provided by the separate ruby-build plugin

## Best for
- Running different Ruby versions across multiple projects
- Pinning a project to a specific Ruby version
- Managing several Ruby installs on one machine

## Pros
- Simple mechanism that is customizable via bash plugins
- Automatically selects the right Ruby version when you change directories
- Can be installed through package managers or a basic git checkout

## Cons
- rbenv install does not ship with rbenv; it requires the ruby-build plugin
- The Debian and Ubuntu packaged version is stated to be out of date
- Installing Ruby requires a build environment with the necessary tools and libraries

## Install
```
brew install rbenv
```

## Usage
```
rbenv local 3.1.2
```

Tags: ruby, version-manager, rbenv, unix, shell, ruby-build, development-environment
