Launchpad PPA for Ruby 1.9.2 and some Ruby Bindings

A few days ago I created a PPA for Ruby 1.9.1 and its bindings. However after working with Rails 3.0.0.beta4 for a bit, I experienced random segmentation faults. Apparently Ruby 1.9.2 (preview3) is more stable for Rails 3 than other versions of Ruby. So I decided to make a PPA for Ruby 1.9.2 and some Ruby Bindings.

Most of the stuff compiled cleanly. The only exception was libxslt-ruby. I have patched it and submitted a bug report here.

You can add the repository to your system using the following command.

sudo add-apt-repository ppa:pratikmsinha/ruby192+bindings

Because of a bug(reported here) in aptitude/python-software-properties, another small change will be required. Executed the following commands.

That is because you’re trying to install it with ruby 1.8 in system. I added symlinks for /usr/bin/rake /usr/bin/irb etc because a normal ruby 1.9.1/1.9.2 doesn’t have those symlinks. If you use just the ruby 1.9.2 on your system, and no other version of ruby you won’t have the problem. Ideally, this should be handled in /etc/alternatives, the way different java versions are handled.

I have updated both ruby1.9.1 and ruby1.9.2 PPAs and now they install using update-alternatives instead of creating symlinks. I’ll be adding the ruby-defaults package too sometime today so that ruby1.8 would also use the alternative system instead of symlinks.