[フレーム]
BT

InfoQ Software Architects' Newsletter

A monthly overview of things you need to know as an architect or aspiring architect.

View an example

We protect your privacy.

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Unlock the full InfoQ experience

Unlock the full InfoQ experience by logging in! Stay updated with your favorite authors and topics, engage with content, and download exclusive resources.

Log In
or

Don't have an InfoQ account?

Register
  • Stay updated on topics and peers that matter to youReceive instant alerts on the latest insights and trends.
  • Quickly access free resources for continuous learningMinibooks, videos with transcripts, and training materials.
  • Save articles and read at anytimeBookmark articles to read whenever youre ready.

Topics

Choose your language

InfoQ Homepage News Ruby 1.9.1 Library Compatibility Roundup

Ruby 1.9.1 Library Compatibility Roundup

Leia em PortuguÃas

This item in japanese

Feb 09, 2009 2 min read

Write for InfoQ

Feed your curiosity. Help 550k+ global
senior developers
each month stay ahead.
Get in touch

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?

Rate this Article

Adoption
Style

This content is in the Ruby topic

Related Topics:

Related Content

The InfoQ Newsletter

A round-up of last week’s content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example

We protect your privacy.

BT

AltStyle によって変換されたページ (->オリジナル) /