Last active
December 15, 2015 14:30
-
-
Save jimmynguyc/e22297209cad3cbca19f to your computer and use it in GitHub Desktop.
Installing Rails on Koding.io
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 | |
# Run with: bash <(curl -L http://bit.ly/install-rails-on-koding-v4_2) | |
date1=$(date -u +"%s") | |
sudo apt-get update | |
sudo apt-get -y install build-essential zlib1g zlib1g-dev sqlite3 libsqlite3-dev git libssl-dev libreadline-dev libxml2-dev libpq-dev nodejs | |
git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
source ~/.bash_profile | |
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build | |
rbenv install 2.2.3 | |
rbenv global 2.2.3 | |
gem install bundler --no-rdoc --no-ri | |
gem install rails --no-rdoc --no-ri | |
rbenv rehash | |
date2=$(date -u +"%s") | |
diff=$(($date2-$date1)) | |
clear | |
echo "Done installing Ruby 2.2.3 and Rails ..." | |
echo "$(($diff / 60)) minutes and $(($diff % 60)) seconds elapsed." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment