|
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +set -e |
| 4 | + |
| 5 | +echo "Updates packages. Asks for your password." |
| 6 | +sudo apt-get update -y |
| 7 | + |
| 8 | +echo "Installs packages. Give your password when asked." |
| 9 | +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 |
| 10 | + |
| 11 | +echo "Installs RVM (Ruby Version Manager) for handling Ruby installation and Ruby" |
| 12 | +curl -L https://get.rvm.io | bash -s stable --ruby |
| 13 | +source ~/.rvm/scripts/rvm |
| 14 | + |
| 15 | +echo "Installs Bundler for Ruby dependency management" |
| 16 | +gem install bundler --no-rdoc --no-ri |
| 17 | + |
| 18 | +echo "Installs Ruby on Rails" |
| 19 | +gem install rails --no-rdoc --no-ri |
| 20 | + |
| 21 | +echo "Installs text editor" |
| 22 | +sudo apt-get install gedit -y |
| 23 | + |
| 24 | +echo -e "\n- - - - - -\n" |
| 25 | +echo -e "Now we are going to print some information to check that everything is done:\n" |
| 26 | + |
| 27 | +echo -n "Should be sqlite 3.7.3 or higher: sqlite " |
| 28 | +sqlite3 --version |
| 29 | +echo -n "Should be rvm 1.6.32 or higher: " |
| 30 | +rvm --version | sed '/^.*$/N;s/\n//g' | cut -c 1-10 |
| 31 | +echo -n "Should be ruby-2.0.0-p247 or higher: " |
| 32 | +ruby -v | cut -d " " -f 2 |
| 33 | +echo -n "Should be Rails 4.0 or higher: " |
| 34 | +rails -v |
| 35 | +echo -e "\n- - - - - -\n" |
| 36 | + |
| 37 | +echo "If the versions match, everything is installed correctly. If the versions |
| 38 | +don't match or errors are shown, something went wrong with the automated process |
| 39 | +and we will help you do the installation the manual way at the event. |
| 40 | +
|
| 41 | +Congrats!" |
0 commit comments