This tutorial is about setting up environment for RubyOnRails on Ubuntu 14.04.
First of all, update & upgrade your system:
sudo apt-get update
^
sudo apt-get upgrade
^
Install git
and curl
:
sudo apt-get install curl
^
sudo apt-get install git-core
^
Configure git
:
git config --global user.name "Your Name"
^
git config --global user.email email@example.com
^
Install RVM
:
curl -sSL https://get.rvm.io | bash -s stable
^
source ~/.rvm/scripts/rvm
^
Test RVM
installation correctness:
type rvm | head -1 #should return something like this: rvm is a function
^
Install some dependencies:
sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev zlib1g
^
sudo apt-get install zlib1g-dev libssl-dev libyaml-dev python-software-properties
^
sudo apt-get install libxml2-dev libxslt-dev libcurl4-openssl-dev autoconf
^
sudo apt-get install libsqlite3-0 libsqlite3-dev sqlite3 #if you plan to use Litesql for RoR application
^
If you see messages like this: perl: warning: Setting locale failed.
throuth the installation process, then you must configure your locales.
If you plan to use Postgresql, perform this steps.
Install ruby:
-
select ruby version you want to install:
^
rvm list known
^
you should see:
^MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-head] # security released on head
[ruby-]1.9.1[-p431]
[ruby-]1.9.2[-p330]
[ruby-]1.9.3[-p547]
[ruby-]2.0.0-p481
[ruby-]2.0.0[-p576]
[ruby-]2.1.2
[ruby-]2.1[.3]
[ruby-]2.1-head
ruby-headGoRuby
goruby
Topaz
topaz
TheCodeShop - MRI experimental patches
tcs
jamesgolick - All around gangster
jamesgolick
Minimalistic ruby implementation - ISO 30170:2012
mruby[-head]
JRuby
jruby-1.6.8
jruby[-1.7.15]
jruby-headRubinius
rbx-1.3.3
rbx-2.0.0
rbx-2.1.1
rbx[-2.2.10]
rbx-headRuby Enterprise Edition
ree-1.8.6
ree[-1.8.7][-2012.02]Kiji
kiji
MagLev
maglev[-head]
maglev-1.0.0Mac OS X Snow Leopard Or Newer
macruby-0.10
macruby-0.11
macruby[-0.12]
macruby-nightly
macruby-headOpal
opal
IronRuby
ironruby[-1.1.3]
ironruby-head
^
To install ruby 2.1.2, for example, type the following:
^
rvm install 2.1.2
If you don't want to install documentation for gems you'll be installing, add in ~/.gemrc
file:
^
gem: --no-document
^