I installed oci8 as a gem and it seemed not to like it. I uninstalled
the gem and then donwloaded the version that needs to be installed by
running a ruby program and now everything is happy.
I had this same issue so in the interest of shortening someone else’s
search I thought I’d document it a little more.
The problem I was having (and I assume pepe) was that the OCI8::Cursor
interface has changed between 1.0.x and 2.0.x. The rails oracle support
(activerecord-oracle-adapter gem) uses 1.0.x. ie: you need to install
the ruby-oci8 gem using:
gem install ruby-oci8 --version "< 2.0.0"
The other time people are getting errors like this seems to be when the
environment variables are not correctly set. You can check out whether
this is the case by executing:
$ irb
require ‘oci8’
=> true
If it barfs then you need to set your environment variables
appropriately (eg: DYLD_LIBRARY_PATH (Mac) or LD_LIBRARY_PATH
(everything else I think) plus maybe ORACLE_HOME and TNS_ADMIN).
I was having this same issue, except I’m running on WEBrick. I had 1.x
and 2.x versions of the ruby-oci8 gem along with version 1.0.0.9250 of
the activerecord-oracle-adapter gem. Removing the 2.x ruby-oci8 fixed
it.
Thanks!!
Brendan Boesen wrote:
I had this same issue so in the interest of shortening someone else’s
search I thought I’d document it a little more.
The problem I was having (and I assume pepe) was that the OCI8::Cursor
interface has changed between 1.0.x and 2.0.x. The rails oracle support
(activerecord-oracle-adapter gem) uses 1.0.x. ie: you need to install
the ruby-oci8 gem using:
gem install ruby-oci8 --version "< 2.0.0"
The other time people are getting errors like this seems to be when the
environment variables are not correctly set. You can check out whether
this is the case by executing:
$ irb
require ‘oci8’
=> true
If it barfs then you need to set your environment variables
appropriately (eg: DYLD_LIBRARY_PATH (Mac) or LD_LIBRARY_PATH
(everything else I think) plus maybe ORACLE_HOME and TNS_ADMIN).