Forum: Ruby on Rails Empty pages served from Lighttpd + SCGI ?

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.
3dd4b52a0946bd698b1d1635a46ea3a3?d=identicon&s=25 Francois Beausoleil (Guest)
on 2005-12-14 08:25
(Received via mailing list)
Hi !

I bought myself a server at RimuHosting.  I am now setting things up
on it.  I have two sites.  The first one is working fine - pages get
served, Rails is up and running.

The second one, though, I can't run.  I can serve static content, but
dynamic content is a no-no.  I'd need some help here - just a pointer
to how to enable more debugging information would help.

Here's the server's error log

T:20: (request.c.293) fd: 9 request-len: 465
GET /account/login HTTP/1.1
Host: sms-gateway.teksol.info
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8)
Gecko/20051107 Firefox/1.5
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: fr-ca,fr;q=0.8,en-us;q=0.5,en;q=0.3
~~~~~~~~~~~~~~~: ~~~~~~~~~~~~
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cache-Control: max-age=0


T:20: (response.c.174) -- splitting Request-URI
T:20: (response.c.175) Request-URI  :  /account/login
T:20: (response.c.176) URI-scheme   :  http
T:20: (response.c.177) URI-authority:  sms-gateway.teksol.info
T:20: (response.c.178) URI-path     :  /account/login
T:20: (response.c.179) URI-query    :
T:20: (response.c.229) -- sanatising URI
T:20: (response.c.230) URI-path     :  /account/login
T:20: (response.c.302) -- before doc_root
T:20: (response.c.303) Doc-Root     :
/var/www/sms-gateway.teksol.info/public
T:20: (response.c.304) Rel-Path     : /account/login
T:20: (response.c.305) Path         :
T:20: (response.c.353) -- after doc_root
T:20: (response.c.354) Doc-Root     :
/var/www/sms-gateway.teksol.info/public
T:20: (response.c.355) Rel-Path     : /account/login
T:20: (response.c.356) Path         :
/var/www/sms-gateway.teksol.info/public/account/login
T:20: (response.c.373) -- logical -> physical
T:20: (response.c.374) Doc-Root     :
/var/www/sms-gateway.teksol.info/public
T:20: (response.c.375) Rel-Path     : /account/login
T:20: (response.c.376) Path         :
/var/www/sms-gateway.teksol.info/public/account/login
T:20: (response.c.393) -- handling physical path
T:20: (response.c.394) Path         :
/var/www/sms-gateway.teksol.info/public/account/login
T:20: (response.c.434) -- file not found
T:20: (response.c.435) Path         :
/var/www/sms-gateway.teksol.info/public/account/login
T:20: (response.c.174) -- splitting Request-URI
T:20: (response.c.175) Request-URI  :  /dispatch.scgi
T:20: (response.c.176) URI-scheme   :  http
T:20: (response.c.177) URI-authority:  sms-gateway.teksol.info
T:20: (response.c.178) URI-path     :  /dispatch.scgi
T:20: (response.c.179) URI-query    :
T:20: (response.c.229) -- sanatising URI
T:20: (response.c.230) URI-path     :  /dispatch.scgi
T:20: (mod_scgi.c.2761) handling it in mod_scgi
T:20: (response.c.302) -- before doc_root
T:20: (response.c.303) Doc-Root     :
/var/www/sms-gateway.teksol.info/public
T:20: (response.c.304) Rel-Path     : /dispatch.scgi
T:20: (response.c.305) Path         :
T:20: (response.c.353) -- after doc_root
T:20: (response.c.354) Doc-Root     :
/var/www/sms-gateway.teksol.info/public
T:20: (response.c.355) Rel-Path     : /dispatch.scgi
T:20: (response.c.356) Path         :
/var/www/sms-gateway.teksol.info/public/dispatch.scgi
T:20: (response.c.373) -- logical -> physical
T:20: (response.c.374) Doc-Root     :
/var/www/sms-gateway.teksol.info/public
T:20: (response.c.375) Rel-Path     : /dispatch.scgi
T:20: (response.c.376) Path         :
/var/www/sms-gateway.teksol.info/public/dispatch.scgi
T:20: (response.c.101) Response-Header:
HTTP/1.1 200 OK
Date: Wed, 14 Dec 2005 05:57:20 GMT
Content-Length: 0
Server: lighttpd/1.4.7

Looking at the log, we can see that mod_scgi is handling the request.
The SCGI process is started and running (scgi_cluster status reports
one process, as configured).

Lighty's config file is thus (much abridged):
server.modules              = ( "mod_rewrite", "mod_redirect",
"mod_access",
                                "mod_scgi", "mod_compress",
"mod_accesslog" )

$HTTP["host"] == "sms-gateway.teksol.info" {
  accesslog.filename = "/var/www/sms-gateway.teksol.info/log/access.log"
  server.document-root = "/var/www/sms-gateway.teksol.info/public"
  server.error-handler-404 = "/dispatch.scgi"
  scgi.server = ( "dispatch.scgi" => (
    "server1" =>
      ( "host" => "127.0.0.1", "port" => 10400, "check-local" =>
"disable")))}

If you want to see the file served from the process, look at this:
http://sms-gateway.teksol.info/account/login

Static files work fine:
http://sms-gateway.teksol.info/stylesheets/scaffold.css

I am really at a loss to explain what the problem is...

Thanks !
3dd4b52a0946bd698b1d1635a46ea3a3?d=identicon&s=25 Francois Beausoleil (Guest)
on 2005-12-16 21:44
(Received via mailing list)
Hi !

Any takers for this ?  I'm really at my wit's end...
http://thread.gmane.org/gmane.comp.lang.ruby.rails/34845


2005/12/14, Francois Beausoleil <francois.beausoleil@gmail.com>:
3dd4b52a0946bd698b1d1635a46ea3a3?d=identicon&s=25 Francois Beausoleil (Guest)
on 2005-12-17 19:24
(Received via mailing list)
Hello everyone,

2005/12/16, Francois Beausoleil <francois.beausoleil@gmail.com>:
> Any takers for this ?  I'm really at my wit's end...
> http://thread.gmane.org/gmane.comp.lang.ruby.rails/34845

I finally found what the problem was.  Bad user experience, though.

Anyway, I configured an ActiveRecord session store.  Unfortunately, I
had forgotten to add myself a migration that would add the sessions
table.  I stumbled upon that after I tried going back to basics: rails
test, script/generate controller Test - works, accept cookie.
Checkout from repository, try using script/server - fail, but see a
500 error.  *Nothing in the logs*.  Notice active_record store
configuration, check DB schema, no sessions table.  Run rake
create_sessions_table, try again, SUCCESS.

Rails should have complained, and LOUDLY that the sessions table did not
exist.

Bye !
8c43ed7f065406bf171c0f3eb32cf615?d=identicon&s=25 Zed A. Shaw (Guest)
on 2005-12-18 07:36
(Received via mailing list)
Ooh, that's not good at all.  I'll mention this to the important folks.

Zed A. Shaw
http://www.zedshaw.com/


On Sat, 17 Dec 2005 11:36:53 -0500
This topic is locked and can not be replied to.