Forum: Ruby on Rails Error 500

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.
Luc B. (Guest)
on 2006-02-22 17:28
(Received via mailing list)
Hi,

I've got a weird 500 error that I can't fix. I'm using scgi with Apache2
on
Fedora core 2.

Status: 500 Internal Server Error

Even when I launch dispatch.cgi from the command line, I get the 500
error.
I don't have any log entry written so I'm completely blind. I know that
the
app is fine because I can run it in the console and get my records from
the
database.

Is there any way to diagnose this ??
unknown (Guest)
on 2006-02-22 17:41
(Received via mailing list)
> I've got a weird 500 error that I can't fix. I'm using scgi with Apache2 on
> Fedora core 2.
>
> Status: 500 Internal Server Error

> Is there any way to diagnose this ??

Anything in the Apache error log or the rails development log?  Maybe
run
the app under the webbrick to verify that the problem only appears under
Apache (or, along the same line under Apache cgi to see if it's just a
problem when under scgi)?
Luc B. (Guest)
on 2006-02-22 17:53
(Received via mailing list)
As far as scgi is concerned, the requests are getting through fine.
Here's
it's status :

Status as of Wed Feb 22 10:45:12 EST 2006:
PID: 11663      Started: Wed Feb 22 09:31:28 EST 2006   Environment:
development

Connected Requests: 0
Conns/Second: Not Set
Total Conns: 4
Max Simultaneous Conns: 1073741823
Shutdown Started: false
Processing Time:  1.31 0.21 0.0 0.0
Current Settings:
   port: 9998
   config: config/scgi.yaml
   logfile: log/scgi.log
   env: development
   control_url: druby://127.0.0.1:8998
   host: 127.0.0.1




As for the Apache log with scgi, here's the entry :

[Wed Feb 22 10:45:06 2006] [error] [client 192.139.148.126] Premature
end of
script headers:
[Wed Feb 22 10:45:06 2006] [error] [client 192.139.148.126] (500)Unknown
error 500: scgi: Unknown error 500: error reading response headers



If I use Webrick (script/server -p 10000 -e development), I get :

[22/Feb/2006:10:50:26 EST] "GET /book HTTP/1.1" 500 0

and the logs are empty again.

All my log files are 777 so I don't get why nothing is written. BUT if I
use
the console and ask for records, stuff gets written to the logs...
weird.


As I told, I'm blind.... and this sucks...


2006/2/22, removed_email_address@domain.invalid 
<removed_email_address@domain.invalid>:
Luc B. (Guest)
on 2006-02-22 18:02
(Received via mailing list)
Here's the response header of webrick :

Response Headers - http://test.lecteurs.ca:10000/book

Connection: Keep-Alive
Date: Wed, 22 Feb 2006 16:01:01 GMT
Server: WEBrick/1.3.1 (Ruby/1.8.3/2005-09-21)
Content-Length: 0

500 Internal Server Error



2006/2/22, Luc B. <removed_email_address@domain.invalid>:
unknown (Guest)
on 2006-02-22 18:24
(Received via mailing list)
> Server: WEBrick/1.3.1 (Ruby/1.8.3/2005-09-21)
> Content-Length: 0
>
> 500 Internal Server Error

> and the logs are empty

I've never used it, but you could try using the breakpointer:
    http://wiki.rubyonrails.org/rails/pages/HowtoDebug...

Set some breakpoints in the methods you expect to fire for the book
index and see which ones you hit?
Luc B. (Guest)
on 2006-02-22 18:30
(Received via mailing list)
The application does not even get to the controller. It fails before.

Where should I put a break point then ?



2006/2/22, removed_email_address@domain.invalid 
<removed_email_address@domain.invalid>:
Frank Cameron (Guest)
on 2006-02-22 18:51
(Received via mailing list)
> The application does not even get to the controller. It fails before.

How recently were your gems updated?  Are you requiring any non-default
libraries?
Luc B. (Guest)
on 2006-02-22 21:18
(Received via mailing list)
The gems were updated yesterday. There's no special library as far as
I know. I've even tested it with a dummy application and I get the
same error.

Le Feb 22 2006 à 11:51, Frank Cameron a écrit :
unknown (Guest)
on 2006-02-22 21:49
(Received via mailing list)
> The application does not even get to the controller. It fails before.

> I've even tested it with a dummy application and I get the same error.

Could you share the relevant code from the dummy application's
contoller,
view, and model?
Luc B. (Guest)
on 2006-02-23 16:25
(Received via mailing list)
Sure I can share it, but it's nothing big. It's the basic app with a
scaffold of a table containing an id and a name. You can create this by
your
own in 1 minute.

I don't know if the problem comes from the server or from the
application.
And since a dummy application fails too, it's comming from the server.

Unless I'm doing something wrong... I chmod to 777 the log folder and
the
public folder, to make sure. Is there any other thing to do ??

2006/2/22, removed_email_address@domain.invalid 
<removed_email_address@domain.invalid>:
This topic is locked and can not be replied to.