500 Error but log shows 200 OK

Hi, I’ve setup a Rails site hosted on BlueHost. It uses gems installed
locally (specifically hpricot for HTML parsing and ‘amazon-ecs’ for
searching products). The code works fine on my local machine and while
most of the site runs smoothly, the search page always returns an error
500. After checking the log file and directory permissions, using
server-generated dispatch files, and making sure the database was
responding correctly, I can’t figure out why the development.log shows
that the request produced a “200 OK” while I see a “500 Server Error”
page. I’ve compared two development.log files…one from setup on the
server and one from my local machine and they are reproduced below.
Anyone have any ideas on things to check?? Thanks.

–> server
Processing BrowseController#general_search (for 128.12.176.38 at
2007-01-09 23:46:43) [post]
Session ID: e5c4a28885b554d24002a052ae7a14dc
…(abbreviated here…does some DB inserts and queries)…
Rendered shared/_welcome (0.01797)
Rendered /shared/_search (0.71242)
Completed in 4.54218 (0 reqs/sec) | Rendering: 1.69148 (37%) | DB:
1.73674 (38%) | 200 OK

–> local machine
Processing BrowseController#general_search (for 127.0.0.1 at 2007-01-09
22:55:49) [post]
Session ID: f34a6d7e37ab8874dd6b85af15ac725c
…(abbreviated here…does some DB inserts and queries)…
Rendered shared/_welcome (0.01000)
Rendered /shared/_search (0.00000)
Completed in 3.00500 (0 reqs/sec) | Rendering: 0.09000 (2%) | DB:
1.23200 (40%) | 200 OK

jimmy wrote:

Hi, I’ve setup a Rails site hosted on BlueHost. It uses gems installed
locally (specifically hpricot for HTML parsing and ‘amazon-ecs’ for
searching products). The code works fine on my local machine and while
most of the site runs smoothly, the search page always returns an error
500. After checking the log file and directory permissions, using
server-generated dispatch files, and making sure the database was
responding correctly, I can’t figure out why the development.log shows
that the request produced a “200 OK” while I see a “500 Server Error”
page. I’ve compared two development.log files…one from setup on the
server and one from my local machine and they are reproduced below.
Anyone have any ideas on things to check?? Thanks.

Sorry, I don’t know what could be behind this. But I think you can
track it down a little more.

You could look at how other actions of the controller behave.
If an empty action

def empty
render :text => ‘success’, :layout => false
end

doesn’t work, that would be one case.

If it does work, try to make the empty action more and more like the
action that fails, until you see the culprit.

Stephan

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs