Prioritize rbenv local over rbenv global and rbenv shell

This commit is contained in:
Sam Stephenson 2013-01-03 10:39:48 -06:00
parent 7e85ae7bd2
commit 266d896871
2 changed files with 20 additions and 20 deletions

View file

@ -38,8 +38,8 @@ bulletproof deployments.
* [Neckbeard Configuration](#neckbeard-configuration)
* [Uninstalling Ruby Versions](#uninstalling-ruby-versions)
* [Command Reference](#command-reference)
* [rbenv global](#rbenv-global)
* [rbenv local](#rbenv-local)
* [rbenv global](#rbenv-global)
* [rbenv shell](#rbenv-shell)
* [rbenv versions](#rbenv-versions)
* [rbenv version](#rbenv-version)
@ -230,30 +230,15 @@ process.
Like `git`, the `rbenv` command delegates to subcommands based on its
first argument. The most common subcommands are:
### rbenv global ###
Sets the global version of Ruby to be used in all shells by writing
the version name to the `~/.rbenv/version` file. This version can be
overridden by an application-specific `.ruby-version` file, or by
setting the `RBENV_VERSION` environment variable.
$ rbenv global 1.9.3-p327
The special version name `system` tells rbenv to use the system Ruby
(detected by searching your `$PATH`).
When run without a version number, `rbenv global` reports the
currently configured global version.
### rbenv local ###
Sets a local application-specific Ruby version by writing the version
name to a `.ruby-version` file in the current directory. This version
overrides the global, and can be overridden itself by setting the
`RBENV_VERSION` environment variable or with the `rbenv shell`
overrides the global version, and can be overridden itself by setting
the `RBENV_VERSION` environment variable or with the `rbenv shell`
command.
$ rbenv local rbx-1.2.4
$ rbenv local 1.9.3-p327
When run without a version number, `rbenv local` reports the currently
configured local version. You can also unset the local version:
@ -265,6 +250,21 @@ file named `.rbenv-version`. For backwards compatibility, rbenv will
read a local version specified in an `.rbenv-version` file, but a
`.ruby-version` file in the same directory will take precedence.
### rbenv global ###
Sets the global version of Ruby to be used in all shells by writing
the version name to the `~/.rbenv/version` file. This version can be
overridden by an application-specific `.ruby-version` file, or by
setting the `RBENV_VERSION` environment variable.
$ rbenv global 1.8.7-p352
The special version name `system` tells rbenv to use the system Ruby
(detected by searching your `$PATH`).
When run without a version number, `rbenv global` reports the
currently configured global version.
### rbenv shell ###
Sets a shell-specific Ruby version by setting the `RBENV_VERSION`

View file

@ -143,7 +143,7 @@ if [ -z "$1" ] || [ "$1" == "rbenv" ]; then
[ -z "$usage" ] || exit
echo
echo "Some useful rbenv commands are:"
print_summaries commands global local shell install uninstall rehash version versions which whence
print_summaries commands local global shell install uninstall rehash version versions which whence
echo
echo "See \`rbenv help <command>' for information on a specific command."
echo "For full documentation, see: https://github.com/sstephenson/rbenv#readme"