Skip to content
Alexander Dean edited this page Jun 10, 2013 · 8 revisions

Ruby setup

Overview

This is a short guide showing you how to setup Ruby ruby with RVM rvm (Ruby Version Manager), the recommended environment for running the Snowplow Ruby applications in.

This guide was written for [Ubuntu Server 12.10] ubuntu, but should work with minor changes in Debian or other Linux distributions.

1. Install dependencies

First we want to install all the pre-requisites for RVM. Namely:

$ sudo apt-get update
$ sudo apt-get install curl
$ sudo apt-get install build-essential bison openssl libreadline5 \
	libreadline-dev curl git-core zlib1g zlib1g-dev libssl-dev \
	libxslt-dev libxml2-dev libpq-dev subversion autoconf	

(A list of these can be printed by entering rvm notes at the command prompt once you have RVM installed.)

2. Install RVM

Now install RVM:

$ curl -L https://get.rvm.io | bash -s stable

Edit ~/.bashrc or ~/.zshrc file by adding the following line to the end of the file:

source $HOME/.rvm/scripts/rvm

Save the above file and close this terminal before proceeding. That way any further configuration or installation work will be RVM-aware.

3. Install a specific version of Ruby

Now we can install all the required version of Ruby simply. The Snowplow Ruby applications use Ruby 1.9.3, so let's install this and make sure it's the default:

$ rvm install 1.9.3 --default

(Optional) To use a particular version enter:

$ rvm use 1.9.3
$ ruby -v # To check the version

4. Project-specific settings

Any Snowplow Ruby projects should have a .rvmrc file in their root, which specifies the Gem file name and the Ruby version to use.

That's it! You are now ready to install any Snowplow Ruby application, such as:

  1. EmrEtlRunner
  2. StorageLoader
Clone this wiki locally