rbenv 0.2.1
usage: rbenv <command> [<args>]
Some useful rbenv commands are:
commands List all rbenv commands
rehash Rehash rbenv shims (run this after installing binaries)
global Set or show the global Ruby version
local Set or show the local directory-specific Ruby version
shell Set or show the shell-specific Ruby version
version Show the current Ruby version
versions List all Ruby versions known by rbenv
which Show the full path for the given Ruby command
whence List all Ruby versions with the given command
See 'rbenv help <command>' for information on a specific command.
For full documentation, see: https://github.com/sstephenson/rbenv#readme
vlad<strong i="5">@pant</strong> /tmp $ rbenv versions
1.8.7-p352
1.9.2-p290
* ree-1.8.7-2011.03 (set by /home/vlad/.rbenv/version)
vlad<strong i="6">@pant</strong> /tmp $ rbenv shell 1.9.2-p290
rbenv: no such command `shell'
vlad<strong i="7">@pant</strong> /tmp $
์ด๋ rbenv init
์ค์ ์ด ์ ๋๋ก ๋์ง ์์์์ ์๋ฏธํฉ๋๋ค.
# .bash_profile
eval "$(rbenv init -)"
์ฃ์กํฉ๋๋ค. ๋ด bash๊ฐ ํ๋กํ์ ๋ก๋ํ๊ณ ์ถ์ง ์๋ค๊ณ ์๊ฐํฉ๋๋ค.
vlad<strong i="6">@pant</strong> ~ $ tail -3 ~/.bash_profile
[ -x /usr/bin/keychain ] && /usr/bin/keychain
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
vlad<strong i="7">@pant</strong> ~ $
vlad<strong i="8">@pant</strong> ~ $
vlad<strong i="9">@pant</strong> ~ $
vlad<strong i="10">@pant</strong> ~ $ rbenv shell
rbenv: no such command `shell'
vlad<strong i="11">@pant</strong> ~ $
vlad<strong i="12">@pant</strong> ~ $ . ~/.bash_profile
vlad<strong i="13">@pant</strong> ~ $
vlad<strong i="14">@pant</strong> ~ $ rbenv shell
rbenv: no shell-specific version configured
vlad<strong i="15">@pant</strong> ~ $
vlad<strong i="16">@pant</strong> ~ $
~/.bash_profile
์ด(๊ฐ) ๊ทํ์ ํ๊ฒฝ/OS์์ ์ ๊ณต๋์ง ์๋ ๊ฒ ๊ฐ์ต๋๋ค. ํ ๋ก ์ #122๋ฅผ ์ฐธ์กฐํ์ญ์์ค.
zsh์์์ ๋น์ ์ ์ด๋ํด์ผ ํ ์ ์์ต๋๋ค eval "$(rbenv init -)"
์ .zshenv
๋์ .zshrc
rbenv ๋น ๋ํ ํ ์์์ ์ฌ์ฉํ ์ ์๋๋ก.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
์ด๋
rbenv init
์ค์ ์ด ์ ๋๋ก ๋์ง ์์์์ ์๋ฏธํฉ๋๋ค.