Skip to content

Instantly share code, notes, and snippets.

@haslinger
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haslinger/608d0835349905a640c6 to your computer and use it in GitHub Desktop.
Save haslinger/608d0835349905a640c6 to your computer and use it in GitHub Desktop.
0010 Installing Ruby and Hobo on a fresh Ubuntu machine

Installing Ruby and Hobo on a fresh Ubuntu Machine

This way several ruby versions can be installed individually and it's easy to switch between them.

Installing prerequesties

sudo apt-get install bash curl git-core build-essential bison openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev curl git-core libyaml-dev libxslt-dev autoconf libmysqlclient-dev libreadline5 libltdl-dev libncurses5-dev libserf1-dbg libsvn1 libtool subversion libgdbm-dev pkg-config libffi-dev@

Installation rvm (Ruby Version Manager): Be sure to switch to the user you want to use this Ruby with. Rubies are installed on a per user basis.

bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

Append the following to your .bashrc-File, that is located ad /home/«YOUR_USER_NAME»/.bashrc That's done easiest with nano ~/.bashrc, because nano gives you help to store, leave, etc. at the bottom line, when started

@source /home/%USER%/.rvm/scripts/rvm@

To test, if everything's fine close your terminal and start a new one and test

@type rvm | head -n1@

The output has to be rvm is a function (or a translated version of that text). Otherwise something went wrong.

To let rvm install missing libraries in the future automatically (this is an optional step)

rvm autolibs 3

Install the latest ruby

rvm install ruby

To install latest hobo

gem install hobo

A fitting rails version is installed automatically. You are done!

Tips

Install a certain ruby version (e.g.)

rvm install ruby-2.1.5

To select a ruby as default

rvm --default use 2.1.5

To use a ruby just for this session

rvm use 2.1.5

Check which rubies are installed

rvm list rubies

Check which rubies rvm can install

rvm list known

Contribute

Do you want to improve these instuctions? Please comment here in the gists or send me an email stefan.haslinger@informatom.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment