Last active
December 19, 2015 18:18
-
-
Save ptantiku/5997526 to your computer and use it in GitHub Desktop.
Install RBENV
This file contains hidden or 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
# Install development tools: | |
sudo apt-get update | |
sudo apt-get -y install build-essential git-core \ | |
make libc6-dev libssl-dev libssl-dev \ | |
libreadline6-dev zlib1g-dev libyaml-dev | |
# Install rbenv: | |
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv | |
# Add rbenv to the path (for BASH): | |
echo 'if [ -d "$HOME/.rbenv" ] ; then' >> .bashrc | |
echo ' export PATH="$HOME/.rbenv/bin:$PATH"' >> .bashrc | |
echo ' export PATH="$HOME/.rbenv/shims:$PATH"' >> .bashrc | |
echo ' eval "$(rbenv init -)"' >> .bashrc | |
echo 'fi' >> .bashrc | |
source ~/.bashrc | |
# Add rbenv to the path (for ZSH) | |
echo 'export RBENV_ROOT="$HOME/.rbenv"' >> .zshrc | |
echo 'if [ -d "$RBENV_ROOT" ]; then' >> .zshrc | |
echo ' export PATH="$RBENV_ROOT/bin:$PATH"' >> .zshrc | |
echo ' export PATH="$RBENV_ROOT/shims:$PATH"' >> .zshrc | |
echo ' eval "$(rbenv init -)"' >> .zshrc | |
echo 'fi' >> .zshrc | |
# Install ruby-build: | |
mkdir -p ~/.rbenv/plugins | |
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
PREFIX=~/.rbenv ~/.rbenv/plugins/ruby-build/install.sh | |
# Install rbenv-bundler: | |
git clone -- git://github.com/carsomyr/rbenv-bundler.git ~/.rbenv/plugins/bundler | |
# Rehash: | |
rbenv rehash | |
# Install Ruby 1.9.3-p448: | |
rbenv install 1.9.3-p448 | |
rbenv global 1.9.3-p448 | |
# Rehash: | |
rbenv rehash | |
# Install Bundler | |
gem install bundler |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment