Forum: Ruby on Rails 404 Error on dispatch.fcgi

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.
A111108ed3617edc35da89e84689c3c2?d=identicon&s=25 Arch Stanton (d6veteran)
on 2006-03-30 02:16
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!
A111108ed3617edc35da89e84689c3c2?d=identicon&s=25 Arch Stanton (d6veteran)
on 2006-03-30 02:33
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:in
`recognize!'
    /vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch'
    /vendor/rails/railties/lib/fcgi_handler.rb:141:in `process_request'
    /vendor/rails/railties/lib/fcgi_handler.rb:53:in `process!'
    /vendor/rails/railties/lib/fcgi_handler.rb:52:in `each_cgi'
    /usr/lib/ruby/1.8/fcgi.rb:597:in `each'
    /usr/lib/ruby/1.8/fcgi.rb:597:in `each_cgi'
    /vendor/rails/railties/lib/fcgi_handler.rb:52:in `process!'
    /vendor/rails/railties/lib/fcgi_handler.rb:22:in `process!'
    dispatch.fcgi:34
30ee518e6fdc5b07e060775b5a542bdb?d=identicon&s=25 Jón Borgþórsson (jongretar)
on 2006-03-30 03:47
(Received via mailing list)
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 <d6veteran@gmail.com> 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
>
--
A111108ed3617edc35da89e84689c3c2?d=identicon&s=25 Arch Stanton (d6veteran)
on 2006-03-30 03:58
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?
30ee518e6fdc5b07e060775b5a542bdb?d=identicon&s=25 Jón Borgþórsson (jongretar)
on 2006-03-30 04:11
(Received via mailing list)
Yup. Must be something strange in the wiki.


On 3/30/06, Arch Stanton <d6veteran@gmail.com> wrote:
>
>
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
This topic is locked and can not be replied to.