|
| 1 | +set -e |
| 2 | + |
| 3 | +echo "Updates packages. Asks for your password." |
| 4 | +sudo apt-get update -y |
| 5 | + |
| 6 | +echo "Installs packages. Give your password when asked." |
| 7 | +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 nodejs -y |
| 8 | + |
| 9 | +echo "Installs ImageMagick for image processing" |
| 10 | +sudo apt-get install imagemagick --fix-missing -y |
| 11 | + |
| 12 | +echo "Installs RVM (Ruby Version Manager) for handling Ruby installation" |
| 13 | +curl -L get.rvm.io | bash -s stable |
| 14 | +echo " |
| 15 | +# RVM |
| 16 | +[[ -s '/Users/`whoami`/.rvm/scripts/rvm' ]] && source '/Users/`whoami`/.rvm/scripts/rvm'" >> ~/.bash_profile |
| 17 | +source ~/.bash_profile |
| 18 | + |
| 19 | +echo "Installs Ruby" |
| 20 | +rvm install 1.9.3-p125 |
| 21 | +rvm use 1.9.3-p125 --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 apt-get install gedit -y |
| 28 | + |
| 29 | +echo -e "\n- - - - - -\n" |
| 30 | +echo -e "Now we are going to print some information to check that everything is done:\n" |
| 31 | + |
| 32 | +echo -n "Should be brew 0.8 or higher: brew " |
| 33 | +brew -v |
| 34 | +echo -n "Should be sqlite 3.7.3 or higher: sqlite " |
| 35 | +sqlite3 --version |
| 36 | +echo -n "Should be rvm 1.6.32 or higher: " |
| 37 | +rvm --version | sed '/^.*$/N;s/\n//g' | cut -c 1-10 |
| 38 | +echo -n "Should be ruby 1.9.3p125: " |
| 39 | +ruby -v | -d " " -f 2 |
| 40 | +echo -n "Should be Rails 3.2.2 or higher: " |
| 41 | +rails -v |
| 42 | +echo -e "\n- - - - - -\n" |
| 43 | + |
| 44 | +echo "If the versions match, everything is installed correctly. If the versions |
| 45 | +don't match or errors are shown, something went wrong with the automated process |
| 46 | +and we will help you do the installation the manual way at the event. |
| 47 | +
|
| 48 | +Congrats!" |
0 commit comments