Installing Ruby RVM on Ubuntu 12.10

I've never used Ruby even though it's apparently the language of the hour (or maybe some hours ago - I'm often late on such stuff), but had to use it today to run some scripts. I didn't know what RVM was until a couple of hours ago, but when I had to use it, I found out that the package doesn't exist on 12.10 :-/

There's probably some PPA out there with updated packages, but a quick search didn't reveal any, so I decided to install it manually. As the packaged Ruby is kinda outdated, and doesn't match with some of the gems, I also installed a fresh version of that. To avoid clashing with anything that might need the packaged version, I installed it in my home directory. Luckily the RVM packagers made it very simple to do.


sudo apt-get install libxslt1.1 libxslt-dev xvfb build-essential git-core curl
Maybe they're not all needed for ruby/rvm, but I followed an instruction on how to run Cumbumber tests for ownCloud. Install RVM (from the RVM install page):
\curl -L | bash -s stable --ruby
Add code to source some init code to your .bashrc (no idea what it does):
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc
Add the bin directory to your PATH:
echo 'export PATH=$HOME/.rvm/bin:$PATH' >> ~/.bashrc
And source it:
. .bashrc
Install necessary dependencies:
bundle install

That's it. Feel free to comment, but I most likely can't answer any questions, because all I did was to collect some snippets from various sources and boil them down to some easy steps :-)

Flattr this!


  1. 1
    JDS says:

    There is a typo/auto-correct-o in the second line of code. Two hyphens were replaced by an em-dash. Probably by your blogging software.

    Thanks seeya bye

  2. 3
    JDS says:

    Hi! Also, your blogging software looks to have replaced proper single and double- quotes with the "nice" versions -- -- which breaks these code snippets if copied directly.

    thanks seeya bye

  3. 4
    AK says:

    I just installed rvm 1.17.0 (the latest stable as of today) and it added the path and rvm load lines to both bash and zsh config files for me. Very convenient for most people.