Skip to content

Instantly share code, notes, and snippets.

@misteral
Created May 4, 2012 16:42
Show Gist options
  • Save misteral/2596068 to your computer and use it in GitHub Desktop.
Save misteral/2596068 to your computer and use it in GitHub Desktop.
install-rails-desktop-env
#!/bin/bash
# bash script for installing Rails environment on Ubuntu 12.04 Server
#
# Some sources has been changed to mirrors in China mainland.
#
# To use this script, do this in your shell:
#
# $ curl -L https://raw.github.com/gist/2596068/install-rails-desktop-env.sh | bash
sudo echo ""; echo "Root Privilege Acquired"
echo ""
echo "======================================="
echo "========= Installing Aptitude ========="
echo "======================================="
echo ""
sudo apt-get -y install aptitude
echo ""
echo "======================================="
echo "=========== Installing RVM ============"
echo "======================================="
echo ""
curl -L get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo ""
echo "======================================="
echo "======= Installing Dependencies ======="
echo "======================================="
echo ""
#(more requirements)
sudo aptitude -y install build-essential openssl libreadline6 libreadline6-dev git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev libxslt-dev autoconf libc6-dev automake libtool bison imagemagick libcurl4-gnutls-dev unzip libmagick++-dev libboost-filesystem-dev
echo ""
echo "======================================="
echo "======== Installing Ruby 1.9.3 ========"
echo "======================================="
echo ""
rvm install 1.9.3
rvm use 1.9.3 --default
rvm install 1.9.3-perf --patch falcon,debug --force-autoconf -j 3
echo ""
echo "ruby version:"
ruby -v
echo ""
echo "gem version:"
gem -v
echo ""
echo ""
echo "======================================="
echo "======= Install Node.js ============"
echo "======================================="
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs npm
echo ""
echo ""
echo "======================================="
echo "======= Install Bundler ============"
echo "======================================="
echo ""
gem install bundler
echo ""
bundle -v
echo ""
#rails -v
echo ""
echo "======================================="
echo "======= Gedit-gmate ==================="
echo "======================================="
#sudo add-apt-repository ppa:ubuntu-on-rails/ppa
#sudo apt-get update
#sudo apt-get install gedit-gmate
wget https://raw.github.com/gist/2894718/pull_all
chmod 744 pull_all
wget https://raw.github.com/gist/2894718/push_all
chmod 744 push_all
echo ""
echo "======================================="
echo "======= Install Java ================="
echo "======================================="
#sudo add-apt-repository ppa:ferramroberto/java
#sudo apt-get update
#sudo apt-get install sun-java6-jdk sun-java6-plugin
echo "======================================="
echo " CONGRATULATIONS! "
echo " INSTALLATION COMPLETED! "
echo "======================================="
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment