Closed mitar closed 9 years ago
I'd go with http://smartinez87.github.io/exception_notification/, but since production.rb is mounted from the container, you'll need to put this in production.rb, :
Rails.application.config.middleware.use ExceptionNotification::Rack,
:email => {
:email_prefix => "[PREFIX] ",
:sender_address => %{"notifier" <notifier@example.com>},
:exception_recipients => %w{exceptions@example.com},
:delivery_method => :smtp,
:smtp_settings => {
:user_name => "bob",
:password => "password",
}
}
I'll take care of the rest when this is done and close the issue
PS : You can also revert production.rb to not display any debug.
Do I have to install anything?
Are SMTP settings necessary, they cannot be reused from the other section? So I have to supply them again?
What is w
in %w
? Why sender_address
does not have one?
I configured the file, you should be getting e-mails as well. Do we have to wait for Docker image update? Can you test it if it works?
It seems it works.
So when something does not work, user gets "We're sorry, but something went wrong." page. Is there a way to also send an e-mail to a site admin when that happens? With debugging info? At least I am used to that in Django. Or is there some other way in Ruby to access all such incidents?