Wednesday, December 05, 2007

Informix adapters for ActiveRecord and ruby-sequel

I have updated Rails/Informix to implement DECIMAL support and fix a pair of bugs that prevented the generation of db/schema.rb. I'm happy to say that on its 1.1.0 release, this adapter is mostly complete - indexes is still missing - and robust.

By the way, even though Rails 2.0 is out already, the ActiveRecord's Informix adapter gem was not published. I have tried to bring this issue to Jeremy Kemper's and Ruby on Rails Talk's attention without success yet. So, in the meantime, just donwload and manually install the distribution from Rails/Informix's project site.

Speaking of O/RM adapters, some weeks ago I found another Ruby O/RM called ruby-sequel which looks very nice to me. It has a nice interface that lets you write queries using Ruby and has just implemented an Informix adapter based on Ruby/Informix. You can take a look at some examples here.

Wednesday, January 24, 2007

One year later

Almost a year has passed since my last post and a lot of things have happened.

I didn't quit my job after all and that meant that I could still work on the Ruby extension and the Ruby on Rails adapter for Informix, which have become richer in features and more robust.


Latest Ruby/Informix version is 0.6.2, and has gained the following features:

  • Use of BigDecimal for MONEY/DECIMAL columns
  • Resource management by means of blocks for statements, cursors and connnections
  • Support for SLOB status and storage characteristics information gathering
  • Thread safety
  • A test suite
  • Error, Warning, and AssertionFailure classes that replace RuntimeError when raising exceptions

Along with bug fixes, more documentation and new handy methods.

The last two features were contributed by Edwin Fine. He helped me to put together the resource management too. Thanks Ed.

In addition to the source distribution and the rubygem, a binary gem is provided for Microsoft Windows users.

There are still many things to do, for the sake of completeness. There's no rush to implement them right now, but if you have a especific request, I'd like to know about it.


Meanwhile, Rails/Informix reached 1.0.0, enabling migrations.

I'm glad to tell you that it was included in the Ruby on Rails repository and will be available as a rubygem when RoR hits 2.0. But you can use it now with RoR 1.x. Just follow the installation instructions from Rails/Informix's website.

To help you get started with Ruby on Rails and Informix, don't forget to visit the following links:

Have been useful to you?

Finally, I'm not making any money from Ruby/Informix or Rails/Informix, and never intended to do so. If not for them, I would be using Perl or Python at work. But my job wouldn't be as fun as it is right now.

But if any of them has been useful to you - like saving your sanity otherwise lost by using ESQL/C or SQR, or making your work more enjoyable and easier by using Ruby on Rails with your favorite DBMS, instead of, God forbid, Uniface! - and feel like giving something back, please consider making a donation, buying something from my Amazon wishlist, or sending a postcard of your country saying hi!