Skip to content

Instantly share code, notes, and snippets.

@cluePrints
Forked from vesan/rails-install-ubuntu.sh
Created February 28, 2012 20:29
Show Gist options
  • Save cluePrints/1934909 to your computer and use it in GitHub Desktop.
Save cluePrints/1934909 to your computer and use it in GitHub Desktop.
Rails Girls Install Scripts for OS X and Ubuntu
echo "Updates packages. Asks for your password."
sudo apt-get update -y
echo "Installs packages. Give your password when asked."
sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev -y
echo "Installs ImageMagick for image processing"
sudo apt-get install imagemagick --fix-missing -y
echo "Installs RVM (Ruby Version Manager) for handling Ruby installation"
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
echo "
# RVM
[[ -s '/Users/`whoami`/.rvm/scripts/rvm' ]] && source '/Users/`whoami`/.rvm/scripts/rvm'" >> ~/.bashrc
export PATH=$PATH:/usr/local/rvm/bin
source ~/.bashrc
echo "Installs Ruby"
rvm install 1.9.2-p318
rvm use ruby-1.9.2-p318 --default
gem install bundler --no-rdoc --no-ri
gem install rails --no-rdoc --no-ri
echo "Installs text editor"
sudo apt-get install gedit -y
echo -e "\n- - - - - -\n"
echo -e "Now we are going to print some information to check that everything is done:\n"
echo -n "Should be sqlite 3.7.3 or higher: sqlite "
sqlite3 --version
echo -n "Should be rvm 1.6.32 or higher: "
rvm --version | sed '/^.*$/N;s/\n//g' | cut -c 1-10
echo -n "Should be ruby 1.9.2: "
ruby -v | cut -c 1-14
echo -n "Should be Rails 3.1.0: "
rails -v
echo -e "\n- - - - - -\n"
echo "If the versions match, everything is installed correctly. If the versions
don't match or errors are shown, something went wrong with the automated process
and we will help you do the installation the manual way at the event.
Congrats!"
echo "Installs Homebrew for installing other software"
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
brew update
echo "Installs ImageMagick for image processing"
brew install imagemagick
echo "Installs RVM (Ruby Version Manager) for handling Ruby installation"
curl -s https://rvm.beginrescueend.com/install/rvm -o rvm-installer ; chmod +x rvm-installer ; ./rvm-installer --version latest
echo "
# RVM
[[ -s '/Users/`whoami`/.rvm/scripts/rvm' ]] && source '/Users/`whoami`/.rvm/scripts/rvm'" >> ~/.bash_profile
source ~/.bash_profile
echo "Install Ruby"
rvm install 1.9.2-p290
rvm use 1.9.2 --default
gem install bundler --no-rdoc --no-ri
gem install rails --no-rdoc --no-ri
echo -e "\n- - - - - -\n"
echo -e "Now we are going to print some information to check that everything is done:\n"
echo -n "Should be brew 0.8 or higher: brew "
brew -v
echo -n "Should be sqlite 3.7.3 or higher: sqlite "
sqlite3 --version
echo -n "Should be rvm 1.6.32 or higher: "
rvm --version | sed '/^.*$/N;s/\n//g' | cut -c 1-10
echo -n "Should be ruby 1.9.2p290: "
ruby -v | cut -c 1-14
echo -n "Should be Rails 3.1.0: "
rails -v
echo -e "\n- - - - - -\n"
echo "If the versions match, everything is installed correctly. If the versions
don't match or errors are shown, something went wrong with the automated process
and we will help you do the installation the manual way at the event.
Congrats!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment