Welcome Guest | Login

Its printing out the dispatch.fcgi file

Hey everyone.  I'm not a deployment in hostingrails newbie but I can't seem to wrap my head around this.  I see this text when accessing my site:

#!/usr/local/bin/ruby
#
# You may specify the path to the FastCGI crash log (a log of unhandled
# exceptions which forced the FastCGI instance to exit, great for debugging)
# and the number of requests to process before running garbage collection.
#
# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log
# and the GC period is nil (turned off).  A reasonable number of requests
# could range from 10-100 depending on the memory footprint of your app.
#
# Example:
#   # Default log path, normal GC behavior.
#   RailsFCGIHandler.process!
#
#   # Default log path, 50 requests between GC.
#   RailsFCGIHandler.process! nil, 50
#
#   # Custom log path, normal GC behavior.
#   RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log'
#
require File.dirname(__FILE__) + "/../config/environment"
require 'fcgi_handler'

RailsFCGIHandler.process!
After looking around I found out that this was my dispatch.fcgi file.

I looked around the forum and found someone ran into this,
http://www.hostingrails.com/forums/deployment_troubleshooting_thread/627

but that person got this problem because the .htaccess file wasn't done correctly.. but mine is this (as it was in all my other deployments in hostingrails):

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

# If you don't want Rails to look in certain directories,
# use the following rewrite rules so that Apache won't rewrite certain requests
#
# Example:
#   RewriteCond %{REQUEST_URI} ^/notrails.*
#   RewriteRule .* - [L]

# Redirect all requests not available on the filesystem to Rails
# By default the cgi dispatcher is used which is very slow
#
# For better performance replace the dispatcher with the fastcgi one
#
# Example:
#   RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
RewriteEngine On

# If your Rails application is accessed via an Alias directive,
# then you MUST also set the RewriteBase in this htaccess file.
#
# Example:
#   Alias /myrailsapp /path/to/myrailsapp/public
#   RewriteBase /myrailsapp

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

# In case Rails experiences terminal errors
# Instead of displaying this message you can supply a file here which will be rendered instead
#
# Example:
#   ErrorDocument 500 /500.html

ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
What should I do? :(

2008-04-01 09:57 PM

This was a server wide issue related with fcgi setup. I have fixed it now. Do check and confirm current status.

2008-04-01 11:22 PM

Regards,
Rahul
It's semi working now, thanks.  It doesn't show the text I had posted earlier.  It's another error now.  Thanks :)

2008-04-07 11:58 PM

The error is gone now and our site is working fine. The apache "missing source file error" was due to the missing haml gem, I've installed it now.

2008-04-08 12:14 AM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.