Last active
December 21, 2015 05:39
-
-
Save lsaffie/6258406 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# One stop-shop to install rbenv, friends and ruby 1.9.3 | |
# Author: Luis Saffie <[email protected]> | |
# USAGE: curl https://gist.github.com/lsaffie/6258406/raw/rbenv-ubuntu-install |bash | |
echo "=========================" | |
echo "remove rvm" | |
echo "=========================" | |
sudo rvm implode |echo "yes" | |
sudo rm -fr /etc/rvmrc | |
sudo rm -fr /etc/rvm | |
echo "=========================" | |
echo "install git-core and curl" | |
echo "=========================" | |
sudo apt-get -y install curl | |
echo "=========================" | |
echo "installing rbenv" | |
echo "=========================" | |
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv | |
echo "=========================" | |
echo "including rbenv in path" | |
echo "=========================" | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile | |
echo "=========================" | |
echo "Shims and automcompletion" | |
echo "=========================" | |
echo 'eval "$(rbenv init -)"' >> ~/.profile | |
echo "=========================" | |
echo "reload bash profile" | |
echo "=========================" | |
source ~/.profile | |
echo "=========================" | |
echo "ruby build" | |
echo "=========================" | |
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
echo "=========================" | |
echo "Here's ruby 1.9.3-p448" | |
echo "=========================" | |
rbenv install 1.9.3-p448 | |
rbenv global 1.9.3-p448 | |
rbenv rehash | |
echo "=========================" | |
echo "updating rbenv and plugins" | |
echo "=========================" | |
rbenv update | |
echo "=========================" | |
echo "restart shell" | |
echo "=========================" | |
source ~/.profile | |
echo "=========================" | |
echo "install bundler" | |
echo "=========================" | |
echo "gem: --no-rdoc --no-ri" >> ~/.gemrc | |
gem install bundler | |
rbenv rehash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment