ruby-oci8 library problems

We started using Oracle with a Ruby on Rails 2.3.x project. I will say, it has been nothing but a pain. After getting the Oracle Instant Client installed and the ruby-oci library compiled, I kept hitting this error during the deployment (BTW: this was on Ubuntu 10.04):

ERROR: ActiveRecord oracle_enhanced adapter could not load ruby-oci8 library. Please install ruby-oci8 gem.

But it was installed. Testing from irb:

irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'oci8'
LoadError: libaio.so.1: cannot open shared object file: No such file or directory - /usr/lib/ruby/gems/1.8/gems/ruby-oci8-2.0.6/lib/oci8lib_18.so
	from /usr/lib/ruby/gems/1.8/gems/ruby-oci8-2.0.6/lib/oci8lib_18.so
	from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
	from /usr/lib/ruby/gems/1.8/gems/ruby-oci8-2.0.6/lib/oci8.rb:38
	from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
	from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
	from (irb):2
	from :0

After some snooping around, I found the libaio library missing. Sigh.

$ apt-get install libaio-dev

Now it works.

This entry was posted in Everything Else. Bookmark the permalink.

4 Responses to ruby-oci8 library problems

  1. Will says:

    Thanks for this! Saved me a serious headache in Debian 6.

  2. Pingback: Passenger and ruby-oci8 (Oracle) | Darian Shimy

  3. An Le says:

    Thank a lot!

  4. Evgeniy says:

    Thanks, that really helped!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">