I wonder about installing the latest version of Ruby on Ubuntu 9.04. Now I can run through the ./configure
and make
stuff fine, but what I wonder about: how to avoid conflicts with the packaging system? For example if some other package I install depends on Ruby, wouldn't the package manager install the (outdated) Ruby package and in the worst case overwrite my files?
So I think I need some way to tell Ubuntu that Ruby is in fact already installed?
Looking through Synaptic it seems like you don't even have to deal with the Multiverse or third-party repositories. But since
sudo apt-get install ruby
currently installs an alias toruby1.8
, you should installruby1.9
explicitly – manually or via the repositories – and create the aliasruby
yourself.You may want to put the binary in
/usr/bin
since that's where the distribution would put it anyway. Anywhere on your PATH is fine, though.I got the Ruby specific info from this site. You can install most software in a different directory with the --prefix=/path switch. And it is common to install in /opt/ for everyone on your pc, or in $HOME if it is only for you.
For installing in /opt:
If you want to use the /opt installed ruby, edit you ~/.bashrc and add
If you don't want to have the custom Ruby build as default, you can add this to your ~/.bashrc instead of the former command
I created a launchpad ppa for ruby 1.9.2. Details in the links below
http://www.humbug.in/2010/launchpad-ppa-for-ruby-1-9-2-and-some-ruby-bindings/
After running
It's solution is to run the following command:
Then you will get this output:
Credit for this solution goes to person who answered https://askubuntu.com/questions/91693/how-do-you-uninstall-ruby-1-8-7-and-install-ruby-1-9-2 . Currently the ruby1.9.1 package is actually ruby 1.9.2.
(http://www.ruby-lang.org/en/downloads/)
Here is a short and convenient way to install 1.9.1 and to make it default: http://michalf.me/blog:make-ruby-1-9-default-on-ubuntu-9-10-karmic-koala