Ruby Installation

From Open Source Ecology
Jump to: navigation, search

Installing a Ruby environment

Under Debian or Ubuntu

Let's install Ruby using RVM.

First, install RVM's dependencies:

$ sudo apt-get install build-essential
$ sudo apt-get install curl
$ sudo apt-get install zlib1g-dev libreadline5-dev libssl-dev libxml2-dev
$ sudo apt-get install git

Now install RVM:

$ bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
vim ~/.bash_profile (append the line below:)
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm

Before installing Ruby, let's install its dependencies:

$ sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev \
git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 \
libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev

Now, install Ruby 1.9.2:

$ rvm install 1.9.2 

Let's also install RubyGem:

Then, install Bundler