Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to install a rails environment on Ubuntu 11.04. I tried:

$ sudo apt-get install ruby-rvm

But got the error:

Unable to locate package ruby-rvm

My other PC has Ubuntu 11.10, and this works fine there:

$ sudo apt-get install ruby-rvm
$ rvm install ruby-1.9.3-p125
$ sudo gem update --system
$ sudo gem install rails
share|improve this question

migrated from unix.stackexchange.com Apr 30 '12 at 23:47

This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems..

4 Answers 4

up vote 3 down vote accepted

The ruby-rvm package is only present since Ubuntu 11.10. Furthermore, one of its dependencies, libreadline-gplv2-dev, only exists under this name since Ubuntu 11.10.

There is a version of ruby-rvm in the Canonical-SIG 3rd party testing PPA. It's for testing, so there may be bugs. See Add a Personal Package Archive (PPA) in the Ubuntu documentation for how to install software from a PPA.

You can grab the package source and compile it on your machine. Download the source from the Ubuntu 11.10 package page (you need all three files: .dsc, .orig.tar.gz and .debian.tar.gz). Install development tools and build dependencies, compile the package, install run-time dependencies and install the package.

wget http://archive.ubuntu.com/ubuntu/pool/universe/r/ruby-rvm/ruby-rvm_1.6.9-0ubuntu2.dsc http://archive.ubuntu.com/ubuntu/pool/universe/r/ruby-rvm/ruby-rvm_1.6.9.orig.tar.gz http://archive.ubuntu.com/ubuntu/pool/universe/r/ruby-rvm/ruby-rvm_1.6.9-0ubuntu2.debian.tar.gz
sudo apt-get install build-essential fakeroot debhelper ruby
dpkg-source -x ruby-rvm_1.6.9-0ubuntu2.dsc
cd ruby-rvm*
dpkg-buildpackage -rfakeroot -b -nc -us -uc
cd ..
apt-get install adduser bison curl file git libreadline5-dev libsqlite3-dev libxml2-dev zlib1g-dev
dpkg -i ruby-rvm_1.6.9-0ubuntu2_*.deb
share|improve this answer
1  
@Yosef That way is a mess! I suggest to follow Chan-Ho Suh way, instead ( see below ). –  Luca G. Soave Jul 30 '13 at 16:26

A simple way to install RVM is to follow the instructions at the developer's site (in fact, the site says "Please use the install process(es) from this site only, as this is the only supported installation types and methods."):

curl -L get.rvm.io | bash -s stable

Load RVM:

source ~/.rvm/scripts/rvm

Find the requirements (follow the instructions):

rvm requirements

Install ruby:

rvm install 1.9.3

On my system (12.04), this all went without a hitch; requirements listed were easy to find and install using apt-get.

share|improve this answer

Try to search ruby-based packages via:

apt-cache search ruby

or you can add | grep ^ruby, if you know, that name of this package started by ruby.

share|improve this answer
    
the ruby-rvm package not exist for ubuntu 11.04 apt-cache search ruby | grep ^ruby => no package with ruby rvm –  Yosef Mar 19 '12 at 14:22

Precise and Trusty

I've created a PPA for Precise and Trusty: https://github.com/raelgc/ubuntu_rvm

Install

1. Add the PPA and install the package

Open a terminal (Ctrl+Alt+T) and run:

sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt-get update
sudo apt-get install rvm

2. Change your terminal window

Now, in order to always load rvm, change the Gnome Terminal to always perform a login.

At terminal window, click Edit > Profile Preferences, click on Title and Command tab and check Run command as login shell.

3. Logout and login

A lot of changes were made and in order to properly get all them working, you need to login and logout. This requires not only close terminal, but really logout and login again.

4. Install a ruby

Now you're ready to install rubies. Open a terminal (Ctrl+Alt+T) and run:

rvm install ruby
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.