Msencenb
Msencenb

Reputation: 5104

Debugging heroku 500 server error?

So this is what I get from looking at my production.logs from heroku:

Completed 200 OK in 63ms (Views: 6.0ms | ActiveRecord: 50.3ms)

  Processing by EventsController#show as HTML

  Parameters: {"id"=>"2"}

Rendered events/show.html.erb within layouts/application (3.7ms)

Completed 500 Internal Server Error in 15ms

Everything works locally and I have even pushed the database to heroku using db:push. Is there any more robust logging for heroku than the lines above that aren't helpful?

Upvotes: 4

Views: 8416

Answers (2)

OZZIE
OZZIE

Reputation: 7348

This isn't related to ruby but it might be good information for other googlers.

My issue not being able to see the actual error was that I was using a third party PHP tool that did this: @ mysql_connect( ... ) which simply hides the error that that function didn't exist .. really evil code

Upvotes: 0

Sam 山
Sam 山

Reputation: 42865

I'm sure its because you haven't ran rake db:migrate

If that does not work make sure that all the gems you need are in your Gem file, i.e. you are not making any local require statements to gems not in the Gemfile.

What I have found helpful is tailing the log.

And then you need to run this in console:

heroku logs --tail

Now click on the same page you were getting problems at before and check out the logs.

EDIT: on rails 4 you'll need to add the rails_12factor gem to get the detailed logs.

Upvotes: 8

Related Questions