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
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>
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>-- Posted via http://www.ruby-forum.com/.
> 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.