ruby-oci8 and libaio

Not of concern to most people reading this via a feed, but it’s one of those things I think is nice to write up as a public service, should anyone else encounter the same error. I’m stuck doing some Rails work with Oracle, and so I needed to get ruby-oci8 working:

http://ruby-oci8.rubyforge.org/en/InstallForInstantClient.html

These instructions are pretty good. I followed them, the gem said it had been installed correctly…. and yet:

ERROR: ActiveRecord oracle_enhanced adapter could not load ruby-oci8 library. Please install ruby-oci8 library or gem.
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:76:in
`establish_connection':RuntimeError: Please install the oracle_enhanced adapter:
`gem install activerecord-oracle_enhanced-adapter` (LoadError)

Argh! After some straceing, I finally figured out what was missing: the libaio1 package. You need to have it or things will fail like this. It’s very odd that the installation doesn’t complain about it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s