Forum: Ruby on Rails FastCgi/OCI8 problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
45937dc3314e12f628bbf6536caa92e1?d=identicon&s=25 Maria Gutierrez (Guest)
on 2006-01-11 15:38
(Received via mailing list)
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.

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

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
F16def8015a7562a285c65a14be48540?d=identicon&s=25 Mathieu Chappuis (Guest)
on 2006-01-11 15:48
(Received via mailing list)
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=<your PATH here>
25dbfa7ee85097df0aedc984a3b12d88?d=identicon&s=25 Maria Gutierrez (Guest)
on 2006-01-11 16:02
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 Chappuis 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=<your PATH here>
F16def8015a7562a285c65a14be48540?d=identicon&s=25 Mathieu Chappuis (Guest)
on 2006-01-11 16:52
(Received via mailing list)
> 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.
This topic is locked and can not be replied to.