Can anyone suggest a way to have any application errors in a Padrino app send these errors via email?
I already have the Padrino Mailer configured properly and can send test emails, I just have no idea how to configure the app to send me a report via mail (as well as logging it, of course) whenever an error occurs.
Thanks.
I ended up using the
padrino-contrib
gem. With it, you can install the plugin you need (of course you can do it manually also):Which will add it to your gem file and also edit your
app/app.rb
andboot.rb
files to load this gem.Then in
app/app.rb
you put something like:And that's it.
The nice thing about letting the plugin install it for you is that if you're more familiar with Rails than Padrino (as is my case) this will not only set things up for you, but also show you were the directives need to go.
Hope this helps someone else.