rbenv

Back to Web-Dev

One option for Ruby dev environment manager (RVM is the other). rbenv works with Bundler to manage dependency versions and versions for Ruby AND Rails.

How It Works

Uses shim executables injected into your PATH, to determine which ruby installation to pass commands to

Choosing the Ruby Version

After shim is executed, rbenv determines which ruby version to use

  1. the RBENV_VERSION env variable, if set
  2. the first .ruby-version file found by searching the directory of the script being run
  3. the first .ruby-version file found by searching the current working directory, then parent directories
  4. The global ~/.rbenv/version, defaulting to system ruby

Ruby installations are found under ~/.rbenv/versions/1.8.7-p371 for example