Ubuntu 9.10 & Ruby – Installation

Being forced to stay in due to falling off the roof, here’s how I got the Ruby working correctly on new Ubuntu 9.10.

Amazingly, the old sudo apt-get install from my Hardy Heron post still works well. I tried doing sudo apt-get install ruby-full, but it installed a bunch of garbage that relates to emacs which I don’t use.

~$ sudo apt-get install ruby irb ri rdoc ruby1.8-dev libzlib-ruby libyaml-ruby libreadline-ruby libncurses-ruby libcurses-ruby libruby libruby-extras libfcgi-ruby1.8 build-essential libopenssl-ruby libdbm-ruby libdbi-ruby libdbd-sqlite3-ruby sqlite3 libsqlite3-dev libsqlite3-ruby libxml-ruby libxml2-dev

It still holds true that you have to install rubygems from the source, NOT the repository. Why? Rubygems should not be installed using the apt-get again due to the fact that it will not let you do gem update –system. This can lead to future upgrade later on. Therefore, download and install from Rubyforge.

wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
tar xvzf rubygems-1.3.5.tgz
cd rubygems-1.3.5
sudo ruby setup.rb
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem

And for those of you still using MySQL, this changed just a slight bit.

sudo apt-get install mysql-server mysql-client libdbd-mysql-ruby libmysqlclient-dev
sudo gem install mysql

The Ruby is version 1.8.7, and if you want the true 1.8.6 version running, you should also install it with the old versions of the library. I found that even with 1.8.6, you still get 1.8.7 problems due to libraries, especially the bindings, but YMMV.

By the way, there’s a bug in 9.10 with gvim where you get stupid gtk gravity failure notice whenever you start gvim from the command line. Although it’s harmless, I find it extremely annoying since it is my editor.

Comments

Comments are closed.

Clicky Web Analytics
Powered by Olark