-
Notifications
You must be signed in to change notification settings - Fork 1
/
rails-ubuntu.sh
41 lines (30 loc) · 1.43 KB
/
rails-ubuntu.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
set -e
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 nodejs -y
echo "Installs RVM (Ruby Version Manager) for handling Ruby installation and Ruby"
curl -L https://get.rvm.io | bash -s stable --ruby
source ~/.rvm/scripts/rvm
echo "Installs Bundler for Ruby dependency management"
gem install bundler --no-rdoc --no-ri
echo "Installs Ruby on Rails"
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-2.0.0-p247 or higher: "
ruby -v | cut -d " " -f 2
echo -n "Should be Rails 4.0 or higher: "
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!"