Tuesday, April 17, 2012

Ruby/Informix 0.8.0 released

The point of this release is to make it compatible with Ruby 1.9.3. It's no longer compatible with Ruby 1.8 which is about to lose support.

Other changes include:

  • the tests now load the extension just built, instead of the one installed
  • adds a gemspec file, that replaces the old Rakefile, to build the gem
  • Rakefile is now used for running the tests, passing the name of the database to test against as a task argument
  • when installing the gem a warning is printed if INFORMIXDIR is not set and exits, instead of trying to guess and failing miserably
You'll need to have the test-unit gem installed in order to run the tests.

6 comments:

dejan said...

Hi,
I am trying to install ruby-informix 0.8 using gem and get the following error:
Building native extensions. This could take a while...
ERROR: Error installing ruby-informix:
ERROR: Failed to build gem native extension.

/usr/local/rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb
Set the Informix environment variables before installing this library

I have downloaded the Informix Client SDK Developer Edition for Linux x86, 32-bit from IBM website.

I have set an env variable:
INFORMIX=/root/informix_driver/

but whenever i run: gem install ruby-informix I get the same error.

Whats the correct setup?

Gerardo said...

Try this:

export INFORMIXDIR=/opt/IBM/informix
sudo -E gem install ruby-informix

dejan said...

Using activerecord-informix-adapter with rails 3.2 when I write a Prepared statement I get an error.

Informix::DatabaseError: Prepared statement is not a cursor specification:

I was searching for the cursor method but couldn't find it.
How to properly execute prepared statements in informix and rails?

Mutesa said...

Thanks for you great work and efforts. I've just migrated one of my apps to 1.9.3 and ....tadaaaa!! Works like a charm. Keep up the good work ;-)

Gerardo said...

I'm glad to know it works for you :)

Thanks for letting me know.

ainun said...

incompatible library version - /home/ainun/.rvm/gems/ruby-2.3.0/gems/ruby-informix-0.8.0/lib/informixc.so

i have installed ruby 2.3.0 and csdk 4.10-FC6DE-linux. i use ubuntu 14.04 LTS.
i also have configured my new ruby application to connect informix server as written in some blogs, including yours.

i got this error when ran rails s , i have tried to solve this for about 2 weeks, can you explain me what this error means and how to solve this? sorry i am bad in english, and also new to rails and informix. thank you.
i hope can get a reply soon,