1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-13 05:43:53 -05:00

Document rbenv which and rbenv whence

This commit is contained in:
Sam Stephenson
2011-09-28 10:48:04 -05:00
parent 058e2cb7a6
commit ada26ab92e
3 changed files with 64 additions and 15 deletions

View File

@@ -44,11 +44,11 @@ tools that do one thing well.
rbenv operates on the per-user directory `~/.rbenv`. Version names in
rbenv correspond to subdirectories of `~/.rbenv/versions`. For
example, you might have `~/.rbenv/versions/1.8.7-p354` and
`~/.rbenv/versions/1.9.3-preview1`.
`~/.rbenv/versions/1.9.3-rc1`.
Each version is a working tree with its own binaries, like
`~/.rbenv/versions/1.8.7-p354/bin/ruby` and
`~/.rbenv/versions/1.9.3-preview1/irb`. rbenv makes _shim binaries_
`~/.rbenv/versions/1.9.3-rc1/bin/irb`. rbenv makes _shim binaries_
for every such binary across all installed versions of Ruby.
These shims are simple wrapper scripts that live in `~/.rbenv/shims`
@@ -92,7 +92,8 @@ zsh users should add this line to `.zshrc` instead:
$ echo 'eval "$(rbenv init -)"' >> .zshrc
4. Restart your shell. You can now begin using rbenv.
4. Restart your shell so the path changes take effect. You can now
begin using rbenv.
$ exec $SHELL
@@ -156,7 +157,7 @@ Sets a shell-specific Ruby version by setting the `RBENV_VERSION`
environment variable in your shell. This version overrides both
project-specific versions and the global version.
$ rbenv shell jruby-1.6.3
$ rbenv shell jruby-1.6.4
When run without a version number, `rbenv shell` reports the current
value of `RBENV_VERSION`. You can also unset the shell version:
@@ -168,7 +169,7 @@ the installation instructions) in order to use this command. If you
prefer not to use shell integration, you may simply set the
`RBENV_VERSION` variable yourself:
$ export RBENV_VERSION=jruby-1.6.3
$ export RBENV_VERSION=jruby-1.6.4
### rbenv versions ###
@@ -178,8 +179,8 @@ the currently active version.
$ rbenv versions
1.8.7-p352
1.9.2-p290
* 1.9.3-preview1 (set by /Users/sam/.rbenv/global)
jruby-1.6.3
* 1.9.3-rc1 (set by /Users/sam/.rbenv/global)
jruby-1.6.4
rbx-1.2.4
ree-1.8.7-2011.03
@@ -199,6 +200,23 @@ version of Ruby, or install a gem that provides binaries.
$ rbenv rehash
### rbenv which ###
Displays the full path to the binary that rbenv will execute when you
run the given command.
$ rbenv which irb
/Users/sam/.rbenv/versions/1.9.2-p290/bin/irb
### rbenv whence ###
Lists all Ruby versions with the given command installed.
$ rbenv whence rackup
1.9.3-rc1
jruby-1.6.4
ree-1.8.7-2011.03
## Contributing ##
The rbenv source code is [hosted on