The Ruby Simple Exception Notification (a.k.a Rusen) gem provides a simple way for logging and sending errors in any ruby application.
The notification includes information about the current request, session, environment and also gives a backtrace of the exception.
source 'http://rubygems.org'
gem 'rusen', '0.0.4’
require 'rusen'
Rusen.settings.outputs = [:io, :email]
Rusen.settings.sections = [:backtrace, :request, :session, :environment]
Rusen.settings.email_prefix = '[ERROR] '
Rusen.settings.sender_address = 'some_email@example.com'
Rusen.settings.exception_recipients = %w(dev_team@example.com test_team@example.com)
Rusen.settings.smtp_settings = {
:address => 'smtp.gmail.com',
:port => 587,
:domain => 'example.org',
:authentication => :plain,
:user_name => 'dev_team@moove-it.com',
:password => 'xxxxxxx',
:enable_starttls_auto => true
}