Mod_ruby and oracle


(Martin Stannard) #1

Hi,

Has anyone had success connecting to an oracle database from mod_ruby on
Linux?

I’ve tried both the OCI8 and Ruby9i modules with and without DBI and
aren’t having any luck. All the combinations can connect to the database
and execute queries successfully from a standalone script or irb. When
used on an rhtml page I’m getting segfaults for ruby9i and errors from
within oci8lib when using oci8.

I can post more detailed error message if required but at the moment I’d
just like to know if this is possible.

regards,

Martin


(Martin Stannard) #2

“Martin Stannard” martins@aardvark.net.au wrote in message news:53481.203.22.14.128.1075184243.squirrel@www.aardvark.net.au

Hi,

Has anyone had success connecting to an oracle database from mod_ruby on
Linux?

I’ve tried both the OCI8 and Ruby9i modules with and without DBI and
aren’t having any luck. All the combinations can connect to the database
and execute queries successfully from a standalone script or irb. When
used on an rhtml page I’m getting segfaults for ruby9i and errors from
within oci8lib when using oci8.

I can post more detailed error message if required but at the moment I’d
just like to know if this is possible.

regards,

Martin

Just a follow-up for anyone else who may be trying this. I had to add
the ORACLE_HOME environment variable to the httpd.conf file to get
Ruby9i working:

SetEnv ORACLE_HOME /opt/oracle/product/9.2.0

regards,

Martin