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.

cd /etc/apt/sources.list.d/
mv pratikmsinha-ruby192+bindings-lucid.list pratikmsinha-ruby192bindings-lucid.list

Once that’s done, update the apt cache and install the applications

sudo aptitude update
sudo aptitude install ruby1.9.2

If you want further guidance regarding adding PPA repositories look at this link. It has screenshots and alternate instructions for older ubuntu systems.

The ruby bindings and dependencies I have added till now are:
libxslt-ruby
libsetup-ruby
ruby-pkg-tools

Hope this helps. RoR does feel more stable now with Ruby 1.9.2.

10 comments

  1. Hello, Pratik!

    Thank you for Your work.

    Found some issues in your package:

    dpkg: error processing /var/cache/apt/archives/ruby1.9.2_1.9.2-preview3ppa1~lucid1_i386.deb (–unpack):
    trying to overwrite ‘/usr/bin/rake’, which is also in package rake 0:0.8.7-1

    dpkg: error processing /var/cache/apt/archives/irb1.9.2_1.9.2-preview3ppa1~lucid1_all.deb (–unpack):
    trying to overwrite ‘/usr/bin/irb’, which is also in package irb 0:4.2

    dpkg: error processing /var/cache/apt/archives/rdoc1.9.2_1.9.2-preview3ppa1~lucid1_all.deb (–unpack):
    trying to overwrite ‘/usr/bin/rdoc’, which is also in package rdoc 0:4.2

    dpkg: error processing /var/cache/apt/archives/ri1.9.2_1.9.2-preview3ppa1~lucid1_all.deb (–unpack):
    trying to overwrite ‘/usr/bin/ri’, which is also in package ri 0:4.2

    Will try to fix this in my ppa soon.

    1. Hi Antono,

      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.

      1. Exactly.

        But why deny usage of ruby 1.8?

        I think you should add this to debian/rules and do not install symlinks with dh_link

        update-alternatives \
        –install /usr/bin/ruby ruby /usr/bin/ruby1.9.2 400 \
        –slave /usr/share/man/man1/ruby.1.gz ruby.1.gz /usr/share/man/man1/ruby1.9.2.1.gz \
        –slave /usr/bin/ri ri /usr/bin/ri1.9.2 \
        –slave /usr/bin/irb irb /usr/bin/irb1.9.2 \
        –slave /usr/bin/rdoc rdoc /usr/bin/rdoc1.9.2 \
        –slave /usr/bin/gem gem /usr/bin/gem1.9.2

        1. Well I didn’t know it was that easy to do it:) Didn’t look it up. I will update the package and leave a comment here when its done. Wouldn’t a similar change be required for the ruby1.8 package too?

          1. 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.

  2. Thanks for your 1.9.2 PPA, I’ll give it a try tonight (or next week…) and will try to upgrade an application to Rails 3.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.