|
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +set -e |
| 4 | + |
| 5 | +# If you decide to skip the full update, be sure to at least run 'sudo yum update audit -y' |
| 6 | +echo "Updates packages. Asks for your password." |
| 7 | +sudo yum update -y |
| 8 | + |
| 9 | +echo "Installs packages. Give your password when asked." |
| 10 | +sudo yum install make automake gcc gcc-c++ kernel-devel patch libffi-devel libtool bison openssl readline readline-devel curl git-core zlib zlib-devel openssl-devel libyaml-devel sqlite sqlite-devel libxml2 libxml2-devel libxslt-devel autoconf glibc-devel nodejs -y |
| 11 | + |
| 12 | +echo "Installs ImageMagick for image processing" |
| 13 | +sudo yum install ImageMagick -y |
| 14 | + |
| 15 | +echo "Installs RVM (Ruby Version Manager) for handling Ruby installation" |
| 16 | +curl -L get.rvm.io | bash -s stable |
| 17 | +source ~/.rvm/scripts/rvm |
| 18 | + |
| 19 | +echo "Installs Ruby" |
| 20 | +rvm install 1.9.3-p392 |
| 21 | +rvm use 1.9.3-p392 --default |
| 22 | + |
| 23 | +gem install bundler --no-rdoc --no-ri |
| 24 | +gem install rails --no-rdoc --no-ri |
| 25 | + |
| 26 | +echo "Installs text editor" |
| 27 | +sudo yum install gedit -y |
| 28 | + |
| 29 | +# Make sure RVM, Ruby and Rails are on the user's path |
| 30 | +echo "export PATH=$HOME/.rvm/bin:$HOME/.rvm/gems/ruby-1.9.3-p392/bin:\$PATH # Added by Rails Girls install script" >> ~/.bashrc |
| 31 | +source ~/.bashrc |
| 32 | + |
| 33 | +echo -n "Should be sqlite 3.7.3 or higher: sqlite " |
| 34 | +sqlite3 --version |
| 35 | +echo -n "Should be rvm 1.6.32 or higher: " |
| 36 | +rvm --version | sed '/^.*$/N;s/\n//g' | cut -c 1-10 | xargs echo |
| 37 | +echo -n "Should be ruby 1.9.3-p392: " |
| 38 | +ruby -v | cut -d " " -f 2 |
| 39 | +echo -n "Should be Rails 3.2.2 or higher: " |
| 40 | +rails -v |
| 41 | +echo -e "\n- - - - - -\n" |
| 42 | + |
| 43 | +echo "If the versions match, everything is installed correctly. If the versions |
| 44 | +don't match or errors are shown, something went wrong with the automated process |
| 45 | +and we will help you do the installation the manual way at the event. |
| 46 | +
|
| 47 | +Congrats!" |
| 48 | + |
0 commit comments