Esta página se muestra en inglés. Una traducción al español está en curso.
ConfigsJul 13, 2026·3 min de lectura

RVM — Ruby Version Manager for Developers

RVM is a command-line tool for installing, managing, and switching between multiple Ruby versions and gemsets on macOS and Linux systems.

Listo para agents

Instalación con revisión previa

Este activo requiere revisión. El prompt copiado pide dry-run, muestra escrituras y continúa solo tras confirmación.

Needs Confirmation · 64/100Política: confirmar
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
RVM Overview
Comando con revisión previa
npx -y tokrepo@latest install a7e5ddf3-7eb9-11f1-9bc6-00163e2b0d79 --target codex

Primero dry-run, confirma las escrituras y luego ejecuta este comando.

Introduction

RVM (Ruby Version Manager) is a shell tool that lets developers install, manage, and work with multiple Ruby environments on a single machine. It compiles Ruby from source, manages gemsets for dependency isolation, and automatically switches Ruby versions when entering project directories. RVM has been the standard Ruby version manager since 2009.

What RVM Does

  • Installs multiple Ruby interpreters (MRI, JRuby, TruffleRuby) from source or binaries
  • Switches between Ruby versions globally, per shell, or per project directory
  • Manages gemsets to isolate gem dependencies between projects
  • Reads .ruby-version and .ruby-gemset files for automatic per-project switching
  • Provides wrappers for cron jobs and scripts that need a specific Ruby environment

Architecture Overview

RVM works by modifying shell environment variables (PATH, GEM_HOME, GEM_PATH) to point to the selected Ruby installation and gemset. It installs Ruby versions into ~/.rvm/rubies/ and stores gemsets under ~/.rvm/gems/. A shell function (loaded via sourcing a script in your profile) intercepts the cd command to detect .ruby-version files and switch environments automatically. RVM can compile Ruby from source using its own build recipes or install precompiled binaries when available.

Self-Hosting & Configuration

  • Install via the official installer script: curl -sSL https://get.rvm.io | bash -s stable
  • Source the RVM script in your shell profile: source ~/.rvm/scripts/rvm
  • Install Ruby versions with rvm install (e.g., rvm install 3.3.0)
  • Create per-project .ruby-version and .ruby-gemset files for automatic switching
  • Use rvm autolibs enable to let RVM install required system dependencies automatically

Key Features

  • Compiles Ruby from source with optimized build flags or installs precompiled binaries
  • Gemsets provide dependency isolation without requiring Bundler for every project
  • Automatic environment switching on directory change via .ruby-version files
  • Named gemsets for maintaining separate gem environments per project or client
  • Supports MRI, JRuby, TruffleRuby, Rubinius, and other Ruby implementations

Comparison with Similar Tools

  • rbenv — lighter approach using shims instead of shell functions; no gemsets built in
  • chruby — minimal Ruby switcher with no installer; pair with ruby-install
  • asdf + ruby plugin — multi-language version manager; RVM is Ruby-specific with gemsets
  • mise — modern polyglot tool manager; RVM has deeper Ruby-specific features
  • Docker — full isolation via containers; RVM provides lighter per-user Ruby management

FAQ

Q: RVM vs rbenv — which should I use? A: Use RVM if you want built-in gemsets and an all-in-one installer. Use rbenv if you prefer a minimal shim-based approach.

Q: Do I still need Bundler with RVM gemsets? A: Bundler is still recommended for reproducible dependency resolution. Gemsets provide an extra isolation layer on top of Bundler.

Q: How do I update RVM itself? A: Run rvm get stable to update to the latest stable release.

Q: Does RVM work on macOS with Apple Silicon? A: Yes. RVM compiles Ruby natively for ARM64 on Apple Silicon Macs.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados