Forum: Ruby on Rails downloads dispatch.fcgi for every request!!

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.
A049c3597983fdaaa2af2b0010c49abc?d=identicon&s=25 Tim Perrett (timperrett)
on 2006-05-25 18:21
Hi All, has anyone ever seen it when they vist the URL in the applicaion
that it just tries to download the FCGI dispatch file?

Im running FC3, Lighttpd1.4.11, Rails 1.1.2 and FastCGI.

i run IRB and get...

 irb(main):001:0> require 'fcgi.so'
 => true

 irb(main):001:0> require 'fcgi'
 => true

On the default rails install page 'riding on rails'.. it should display
the server details about your enviroment, but it doesnt execute the FCGI
i dont think. As it doesnt display the info, but at the same time it
doesnt error either.

Has anyone got any ideas? im a bit stuck!!

thanks

tim
59de94a56fd2c198f33d9515d1c05961?d=identicon&s=25 Tom Mornini (Guest)
on 2006-05-25 18:28
(Received via mailing list)
Show us the lighty config, and make sure dispatch.fcgi is
executable.

--
-- Tom Mornini
A049c3597983fdaaa2af2b0010c49abc?d=identicon&s=25 Tim Perrett (timperrett)
on 2006-05-25 18:31
The lighty config is...

var.basedir = "/var/www/sites/"

$SERVER["socket"] == "101.0.0.171:80" {

var.servername = "stage.butlerandtanner.com"

server.document-root = basedir + servername + "/public/"

# rewrite rules for rails
  url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "$1.html" )
  server.error-handler-404 = "/dispatch.fcgi"

fastcgi.server = (
  basedir + servername + "/public/dispatch.fcgi" =>
    ( "localhost" =>
      ( "socket" => basedir + servername + "/tmp/sockets/fcgi.socket",
		"min-procs" => 2,
        "max-procs" => 4,
        "max-load-per-proc" => 2,
        "bin-path" => basedir + servername + "/public/dispatch.fcgi",
        "bin-environment" => ( "RAILS_ENV" => "production" )
      )
    )
)

}

The dispatch.fcgi is chmod to 755

Any ideas?

thanks

Tim

Tom Mornini wrote:
> Show us the lighty config, and make sure dispatch.fcgi is
> executable.
>
> --
> -- Tom Mornini
A049c3597983fdaaa2af2b0010c49abc?d=identicon&s=25 Tim Perrett (timperrett)
on 2006-05-25 18:36
Additionaly... if i run the fcgi file from the command line, i get an
error as you would expect

[root@localhost www]# ruby
/var/www/sites/stage.butlerandtanner.com/public/dispatch.fcgi
Status: 500 Internal Server Error
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html>
<body>
  <h1>Application error</h1>
  <p>Change this error message for exceptions thrown outside of an
action (like in Dispatcher setups or broken Ruby code) in
public/500.html</p>
</body>
</html>[root@localhost www]#
A049c3597983fdaaa2af2b0010c49abc?d=identicon&s=25 Tim Perrett (timperrett)
on 2006-05-25 20:41
hmmmm, anyone got any ideas?

Thanks

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