404 Error on dispatch.fcgi

I’m a java/php programmer trying out Ruby/Rails on my Dreamhost account.
I followed the wiki steps to the letter (2x now) and am still getting a
404 when I hit my dispatch.fcgi.

http://mydomain.com/public/dispatch.fgci

Can someone give me suggestions on how to debug this problem?

Here is my dispatch.fcgi file:

#!/usr/bin/env 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’

class RailsFCGIHandler
private
def frao_handler(signal)
dispatcher_log :info, “asked to terminate immediately”
dispatcher_log :info, “frao handler working its magic!”
restart_handler(signal)
end
alias_method :exit_now_handler, :frao_handler
end

RailsFCGIHandler.process!

Here is the error I get:

ctionController::RoutingError (Recognition failed for “/dispatch.fcgi”):
/vendor/rails/actionpack/lib/action_controller/routing.rb:469:in
recognition_failed' /vendor/rails/actionpack/lib/action_controller/routing.rb:459:inrecognize!’
/vendor/rails/railties/lib/dispatcher.rb:38:in dispatch' /vendor/rails/railties/lib/fcgi_handler.rb:141:inprocess_request’
/vendor/rails/railties/lib/fcgi_handler.rb:53:in process!' /vendor/rails/railties/lib/fcgi_handler.rb:52:ineach_cgi’
/usr/lib/ruby/1.8/fcgi.rb:597:in each' /usr/lib/ruby/1.8/fcgi.rb:597:ineach_cgi’
/vendor/rails/railties/lib/fcgi_handler.rb:52:in process!' /vendor/rails/railties/lib/fcgi_handler.rb:22:inprocess!’
dispatch.fcgi:34

um… All your setup seems a bit dubious to me…

First of all. You should not have a domain.com/public/ dir. The
DirectoryRoot should be at /application/public not /application.

You should not be accessing dispatch.fcgi from your browser at all.
just simply the / dir.

But also. What does your .htaccess file say?

On 3/30/06, D6 Veteran [email protected] wrote:

#!/usr/bin/env ruby

could range from 10-100 depending on the memory footprint of your app.

alias_method :exit_now_handler, :frao_handler

Jón Borgþórsson wrote:

um… All your setup seems a bit dubious to me…

First of all. You should not have a domain.com/public/ dir. The
DirectoryRoot should be at /application/public not /application.

You should not be accessing dispatch.fcgi from your browser at all.
just simply the / dir.

But also. What does your .htaccess file say?

Ok I mispoke. My directory root is at /application/public. That was a
typo on my part.

The set up wiki says to hit dispatch.fcgi to make sure it is working -
that sounded odd to me as well, but I did it anyway, and got a 404.

If I hit my domain I get the standard ruby/rails index. So am I too
assume everything is working?

Yup. Must be something strange in the wiki.

On 3/30/06, Arch S. [email protected] wrote:


Posted via http://www.ruby-forum.com/.


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails