Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Ruby 1.9.1 Library Compatibility Roundup

Ruby 1.9.1 Library Compatibility Roundup

Leia em Português

This item in japanese


Ruby 1.9.1 is the first stable release of the 1.9.x series, and brings, among many language and standard library enhancements , significant performance improvements.

However, compatibility with existing code and Gems can be stumbling block when migrating to 1.9.1. There are different reasons for that. The ParseTree Gem, for instance, is not available because the new Ruby VM doesn't keep a Ruby parsetree around after the source code's parsed and compiled into bytecode. A partial replacement is available in the Ripper library shipped with 1.9.x (MacRuby, for instance, uses Ripper to parse Ruby sources for some purposes). Libraries that only require parsing of source code can get by with either Ripper or ruby_parser.
Another potential reason for compatibility problems are subtle changes in the language semantics, such as block variables which are now scoped properly, as well other changes.

Whatever the reasons, the release of 1.9 in 2007, and more so the release of 1.9.1 earlier this year has now caused increased attention to getting libraries ready for 1.9.x.

According to many reports, Rails 2.3 (or Rails Edge) appears to be 1.9.x compatible, earlier releases seem to have problems. Ryan Bigg detailed a list of issues that come up with using Rails on 1.9.1. The Phusion Passenger blog reports that their most recent version is compatible with 1.9.1, and detail which libraries they had to update or patch to make this work. Some database adapters are read, such as the MySQL adapter released version 2.8.1 which is supposed to work with Ruby 1.9.1.

An interesting solution to determining compatibility information is available at The site lists Ruby Gems and allows users to report their experiences with compatibility. A nice feature is a green and a red bar next to the name of the Gem, which show the number of user reports of success or failure of this Gem on 1.9.
The results should be taken with a grain of salt though, particularly Gems with only one user report. At publication time of this news item, the ParseTree Gem was reported as "Working", something contradicted by an earlier message by Ryan Davis, the creator of ParseTree. Also, a quick test run of ParseTree in a Ruby 1.9.1 instance fails with

parse_tree.rb:3:in `': ParseTree doesn't work with ruby 1.9.1 

Nevertheless, is one place to start when looking for compatibility answers.

What's holding you back from migrating to Ruby 1.9.1?

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • fear

    by Roger Pack,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    well that and there's no ruby_parser

  • Re: fear

    by Roger Pack,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    or rather ParseTree

  • oh puh-leez

    by Ralph Siegler,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    no documentation, pickaxe three in beta, libraries not done yet, creators themselves say it's a development release not for production.....those of us with more common sense than bravado are more than happy to let you oooo-look-shiny kidz stub your toes for a year or so and file bug reports, the rest of us get with the new Ruby probably early next year or so, no rush.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p