InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Ruby 1.9.1 Library Compatibility Roundup

Posted by Werner Schuster on Feb 09, 2009

Sections
Development
Topics
Ruby ,
RubyGems ,
Runtimes ,
Ruby on Rails
Tags
Ruby1.9

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 http://isitruby19.com/. 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, http://isitruby19.com is one place to start when looking for compatibility answers.

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

fear by Roger Pack Posted
Re: fear by Roger Pack Posted
oh puh-leez by Ralph Siegler Posted
  1. Back to top

    fear

    by Roger Pack

    well that and there's no ruby_parser

  2. Back to top

    Re: fear

    by Roger Pack

    or rather ParseTree

  3. Back to top

    oh puh-leez

    by Ralph Siegler

    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.

Educational Content

Jesper Boeg on Priming Kanban

In this interview, Jesper Boeg, author of the new InfoQ book – Priming Kanban, discusses the keys to using Kanban effectively, and how to get started if you are currently using other approaches.

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.