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.
Uses shim executables injected into your PATH
, to determine which ruby installation to pass commands to
~/.rbenv/shims
is added in front of the PATH
irb
, gem
, rake
, rails
, ruby
)PATH
for executable (like rake
)rake
at the beginning of PATH
(in shims directory)rake
which passes the command along to rbenvAfter shim is executed, rbenv determines which ruby version to use
RBENV_VERSION
env variable, if setrebenv shell
command lets you specify this.ruby-version
file found by searching the directory of the script being run.ruby-version
file found by searching the current working directory, then parent directoriesrbenv local
to edit this~/.rbenv/version
, defaulting to system rubyrbenv global
to editRuby installations are found under ~/.rbenv/versions/1.8.7-p371
for example