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 https://gist.github.com/ngauthier/5039249/raw/1868bf4714052b40e2bb7fdf3f40fbeb5d730bca/ruby-2-install-ubuntu.sh | bash -s
#!/usr/bin/env bash
set -e
sudo apt-get build-dep ruby1.9.1
wget -c http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz
tar xzf ruby-2.0.0-p0.tar.gz
cd ruby-2.0.0-p0
./configure
make
sudo checkinstall -y \
--pkgversion 2.0.0-p0 \
--provides "ruby-interpreter"
@pahnin

This comment has been minimized.

Show comment Hide comment
@pahnin

pahnin Mar 1, 2013

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

pahnin commented Mar 1, 2013

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

@kleinmat

This comment has been minimized.

Show comment Hide comment
@kleinmat

kleinmat Mar 18, 2013

just in case: do a

sudo apt-get install checkinstall

before you run the script above

just in case: do a

sudo apt-get install checkinstall

before you run the script above

@rafapolo

This comment has been minimized.

Show comment Hide comment
@rafapolo

rafapolo Apr 22, 2013

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

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

@silasdavis

This comment has been minimized.

Show comment Hide comment
@silasdavis

silasdavis Jun 4, 2013

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

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

@tesfabpel

This comment has been minimized.

Show comment Hide comment
@tesfabpel

tesfabpel Jun 14, 2013

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

Thanks :-)

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

Thanks :-)

@jaygalligher

This comment has been minimized.

Show comment Hide comment
@jaygalligher

jaygalligher Jul 11, 2013

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

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

@pije76

This comment has been minimized.

Show comment Hide comment
@pije76

pije76 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

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

@gauravbansal74

This comment has been minimized.

Show comment Hide comment
@gauravbansal74

gauravbansal74 Dec 16, 2015

Thanks @pije76 :) :)

Thanks @pije76 :) :)

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