500 in Heroku logs, but no errors from Rails (even with rails_12factor)

When I finish the logs and hit my application, I have heroku[router], telling me that I got 500, and the application shows the usual message "We are sorry, but something went wrong" ... but there is no additional data from Rails in the logs, to tell me what causes 500.

I read a couple of other threads that asked a question about this, but basically they end with those who offer to do rake:db migratethat fixed the error, but, unfortunately, there are no further discussions in the journal. (And yes, I'm sure there are no pending migrations 😄)

  • I have rails_12factor gem installed
  • I tried setting config.log_level = :debuginproduction.rb
  • I tried to create a configuration variable LOG_LEVELset to DEBUG(which should replace the configuration setting)
  • I set $stdout.sync = truein config.ru as suggested here

What am I missing?

As an aside, they tried to re-produce my current problem locally with a backup copy of the database used with Heroku, but I can not reproduce it, so I finally have to figure out this registration problem.

+4
source share
2 answers

At first, I just got this to work, manually adding:

config.logger = Logger.new(STDOUT)

to production.rb, but that hid the real problem ...

RACK_ENV RAILS_ENV staging, :production... , , rails_12factor ( , , , !)

staging.rb production.rb, STDOUT , .

, - - / , !:)

+3

.

, , PaperTrail , .

, , .. .

heroku cli.   heroku addons:create papertrail

0

Source: https://habr.com/ru/post/1598999/


All Articles