Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 296
Msencenb Avatar asked Jan 20 '23 05:01

Msencenb


1 Answers

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.

like image 56
thenengah Avatar answered Jan 28 '23 19:01

thenengah