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" |
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
when
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.
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 :) :)
I did this but I still get 1.9.3 when I did ruby -v!?