Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
install ruby 2.0.0-p0 on ubuntu

Installs ruby-2.0.0-p0 on ubuntu via checkinstall so it's in your package manager and you can remove it.

Quick install:

curl -L | bash -s
#!/usr/bin/env bash
set -e
sudo apt-get build-dep ruby1.9.1
wget -c
tar xzf ruby-2.0.0-p0.tar.gz
cd ruby-2.0.0-p0
sudo checkinstall -y \
--pkgversion 2.0.0-p0 \
--provides "ruby-interpreter"

pahnin commented Mar 1, 2013

I did this but I still get 1.9.3 when I did ruby -v!?

just in case: do a

sudo apt-get install checkinstall

before you run the script above

I got a
E: You must put some 'source' URIs in your sources.list
sudo apt-get build-dep ruby1.9.1

Check there are some uncommented entries in /etc/apt/sources.list beginning with 'deb-src' and/or run apt-get update

How can I use this new package with update-alternatives?
It's not listed there when i do update-alternatives --config ruby

Thanks :-)

Forgot to install checkinstall. Used quick install and it installed 1.8.7. Purging it.

pije76 commented Sep 23, 2013

Try this:
sudo add-apt-repository ppa:brightbox/ruby-ng-experimental
sudo apt-get update
sudo apt-get install -y ruby2.0 ruby2.0-dev ruby2.0-doc

Now you can do update-alternatives --config ruby

Thanks @pije76 :) :)

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