Created
April 7, 2015 07:15
-
-
Save rahul286/7160839f4425a3b7e718 to your computer and use it in GitHub Desktop.
rbenv ubuntu server cheatsheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## ubuntu server with bash shell | |
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
## verify | |
type rbenv | |
#=> "rbenv is a function" | |
## list all available versions: | |
rbenv install -l | |
## install a Ruby version: | |
rbenv install 2.2.1 | |
## uninstall a Ruby version: | |
rbenv uninstall 2.2.1 | |
## Set application specific version number (written in `.ruby-version`) | |
rbenv local 2.2.2 | |
## Unset application specific version number | |
rbenv local --unset | |
## Set global version number for a user (written in `~/.rbenv/version`) | |
rbenv global 2.2.2 | |
## Unset application specific version number | |
rbenv global --unset | |
## System version of ruby | |
The special version name system tells rbenv to use the system Ruby | |
## Set shell-specific version number | |
rbenv shell 2.2.2 | |
## Unset application specific version number | |
rbenv shell --unset | |
## Installed versions | |
rbenv versions | |
## Current version | |
rbenv version | |
## ruby installed or gem installed which provides commands | |
rbenv rehash | |
## display path to ruby executable | |
rbenv which |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The way all cheat sheets should be.