FastCgi/OCI8 problem


#1

Hi,

I’m having problems running my rails application in the following
setup Unix/Apache/FastCgi/Oracle10g.

I had my app running quite happy until I installed the OCI8 driver.
When I try to load the app I get in the apache logs the famous

“undefined method ‘define_a_column’ for class OCI8:Cursor (NameError)”

I think the problem is with the fastcgi set up since I’ve been able to
test the connection by running ruby scripts from the shell command and
my app runs quite happy in WebBrick.

I’ve added all the suggested environment variables to my httpd.conf
(ORACLE_HOME, LD_LIBRARY_PATH, ORACLE_SID). They are all se up
correctly since I can print them out in environment.rb.

FastCgiIpcDir /tmp/fcgi_ipc FastCgiServer /usr/local//public/dispatch.fcgi \ -initial-env RAILS_ENV=stage \ -initial-env ORACLE_HOME=/oracle/product/10.2.0/client \ -initial-env ORACLE_SID= \ -initial-env LD_LIBRARY_PATH=/oracle/product/10.2.0/client/lib \ -processes 10 -idle-timeout 60

I’ve also tried setting this variables in the VirtualHost for my app
with no luck.

Plese any ideas of any variable missing or any obvious mistake. I’ve
already spend quite a lot of time trying to sort this out with no
success.

Thanks for your help.

Maria


#2

Salut Maria,

            -initial-env RAILS_ENV=stage \

Are you sure of this ? usually ['development, production, test]

Try adding :

-initial-env RUBYOPT=rubygems
-initial-env PATH=


#3

Mathieu,

I’ve tried this but I’m still getting the same problem. Any other ideas?

I use a self-created stage environment to test my application in a
unix/apache set up before the app goes live, since the development of
the app is done in Windows/WebBrick. I could use development as well but
the databases are different so rather keep it separate.

Maria

Mathieu C. wrote:

Salut Maria,

            -initial-env RAILS_ENV=stage \

Are you sure of this ? usually ['development, production, test]

Try adding :

-initial-env RUBYOPT=rubygems
-initial-env PATH=


#4

I’ve tried this but I’m still getting the same problem. Any other ideas?

It’s looks like the oci8.rb is not read/found by the AR Adapter.

I’m for a load path issue here…

Check <%= debug ENV %> in your differents environments for tracking
down most noticeable differences.