Rails 404,422,500 completely empty

This is probably very simple, but I can’t understand why I do not have error pages.

Firstly, I use Heroku for hosting, so it is definitely in production mode.

If I set the line "config.action_controller.consider_all_requests_local" to true, I get a detailed error message, but otherwise I get a 100% blank screen. If I look at the source, it is also empty.

All my 404,422,500.html files are in public, and I did not touch them.

And they seem to be working on my local machine if I am in production mode there. So this should be connected with Geroku? Any ideas?

Magazines don't tell me anything useful.

The following is information about the production.rb file

config.cache_classes = true

#ActionMailer::Base.delivery_method = :sendmail
Paperclip.options[:command_path] = "/usr/bin/"

# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false

# set delivery method to :smtp, :sendmail or :test
config.action_mailer.delivery_method = :smtp

# Full error reports are disabled and caching is turned on
config.action_controller.consider_all_requests_local = false
config.action_controller.perform_caching             = true
config.action_view.cache_template_loading            = true
+3
1

, Heroku .html , Passenger Mongrel. , :

  • rescue_from ApplicationController , , , Object.
  • , , .

"500", - . , - .

Apache ErrorDocument.

+3

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


All Articles