Forum: Rails deployment Apache deployment - Debugging

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
D59a497ca2a28b8d1132942c57bbd4a2?d=identicon&s=25 Jeff Lockyer (jlockyer)
on 2014-07-22 01:04
I have the following setup on a new box (to mimic a machine that failed)

Ruby 1.8.4
Rails 1.1.6
RubyGems 0.9.0

Running Apache version 1.33 (as this is an old OSX server build) and
therefore passenger is not installed on this machine. This is a single
Rails APP running on a machine with 2 virtual hosts (the same site, just
one running port 80, which forwards to 443 (the second virtual host) for
all code execution).

I have the entire subfolder of the project from the previous machine.
The only difference that I can tell is that PostgreSQL is being hosted
on another machine, rather than the same machine (as prior)  I have
adjusted the database.yml file to reflect this, for connection details
in the code execution.

This project is running on a machine, running FastCGI. I installed the in Apache and added the following lines to httpd.conf

LoadModule fastcgi_module     libexec/httpd/
AddModule mod_fastcgi.c

<IfModule mod_fastcgi.c>
        FastCgiIpcDir /tmp/fcgi_ipc
        AddHandler fastcgi-script .fcgi

** /tmp/fcgi_ipc directory has writeable permissions

I then made sure that added the following to one of my site definitions
under apache in /etc/httpd/sites/

<Directory "path to public folder of my rails APP">
  AllowOverride all
  Allow from all
  Order allow,deny

The .htaccess file in public/ folder is a normal .htaccess file that
didn't seem to be any different for the project I brought over,
including the lines

# General Apache options
AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI


RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

I will ALWAYS get a 500 error, and will then see the output of the
500.html file, in the public folder, which will yield the typical
"Change this error message for exceptions thrown outside of an action
(like in Dispatcher setups or broken Ruby code) in public/500.html"

Is there a way I can get some active debugging, to see if my code is
even being parsed by Apache ?

I tried to start a new project just from scratch to ensure that rails
produced a project structure, etc, and then ran that project using
script/server and looked at it through webRICK using and
all seemed well, with the usual "You're riding rails" screen...

I really need to try to make this thing work (as I am sure the rails
side of things is OK, since this is a straight copy of a previous
deployment), and am willing to provide payment for services if required,
it just seems quite difficult to find legacy support for old Ruby code
and updating the code at this point isn't really a priority, just want
to get it back on track.

Thanks in advance to you all !
This topic is locked and can not be replied to.