Skip to content

@mislav mislav released this Dec 24, 2015 · 123 commits to master since this release

rbenv is a robust tool that follows the UNIX methodology to implement per-project selection of Ruby versions and related runtime environment. The rbenv community maintains an ecosystem of plugins, and rbenv has inspired many other forks for managing environments of different programming languages and other software tools.

rbenv works by:

  1. Having its shims/ directory prepended to PATH environment variable;
  2. Reading a .ruby-version file in the project's directory that specifies the Ruby version to be activated.

How to install/upgrade

The rbenv-installer script automates installation or upgrading rbenv on your system with either Homebrew (if available) or by using git to install to ~/.rbenv directory.

For manual installation instructions and more details, see Installation chapter of rbenv README.

Changes since v0.4.0

Speed 🐎

  • Speed up rbenv with dynamically loaded realpath C extension
  • Speed up rbenv rehash when there are many Ruby versions with similar sets of executables
  • Improve performance of rbenv-which for "system" version
  • Avoid rbenv-exec calling out to rbenv-version-name twice

To compile the optional C extension that speeds up rbenv across the board:

# substitute with location where you installed rbenv source:
$ cd ~/.rbenv
$ src/configure && make -C src

New features 🎁

  • New plugin hooks version-name and version-origin enable plugin authors to hook into version selection logic.
  • rbenv versions --skip-aliases --bare will only list versions that are not aliases (symlinks) for other versions.
  • rbenv version-file <dir> finds a .ruby-version file in the target directory or any of its parent directories.
  • rbenv init now recognizes and supports fish shell syntax. 🐟
  • rbenv --debug <command> is a shortcut for enabling RBENV_DEBUG.

Shell integration 🐚

  • Fix rbenv() shell function in ksh and dash
  • Ubuntu fix: use source instead of .
  • Reliably detect user's current shell in rbenv init
  • Improve detection of completion support for commands
  • Fix detecting completions support on OpenBSD
  • Check if completion script is readable
  • Suppress shell warnings when hashing is disabled by set +h
  • rbenv() shell function preserves multiline output of sh-* commands

General enhancements

  • rbenv local now respects .ruby-version file in parent directories as well
  • rbenv versions now emits a warning when no Ruby versions were found
  • Consistently support rbenv <command> --help as alternative to rbenv help <command>
  • Improve parsing of git revision in rbenv --version when rbenv was installed from git
  • Export PS4 when RBENV_DEBUG is set for more informative debug output

Bug fixes 🐞

  • Fix incorrect formatting of rbenv-help output under MAWK (Ubuntu)
  • Prefer gawk over awk if both are available
  • Fix resolving symlinks in rbenv-hooks
  • Fix iterating through paths that have spaces in them
  • Fix rbenv rehash when paths have spaces in them
  • More useful error message when rehash fails on a non-writable directory
  • Make rbenv-exec fail for invalid Ruby version
  • Bail out early if readlink is not available
  • Properly resolve symlinks when listing hook scripts
  • Better error message for rbenv prefix system
  • Fix reading .ruby-version on platforms that don't support process substitution
  • Remove carriage return characters in .ruby-version files
  • Fixes rbenv on OpenBSD and other systems that don't support head -c
  • Guard against exported CDPATH
  • Ensure that IFS is reset to its original value within hook scripts
Assets 2
You can’t perform that action at this time.