diff --git a/Gemfile b/Gemfile index f0a6ec35..91d4789e 100644 --- a/Gemfile +++ b/Gemfile @@ -37,6 +37,7 @@ gem 'bootstrap', '~> 4.0.0.beta3' gem 'jekyll' gem 'jquery-rails' gem 'font-awesome-rails' +gem 'exception_notification' group :development, :test do gem 'pry' diff --git a/Gemfile.lock b/Gemfile.lock index 446786ad..f0c38439 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -94,6 +94,9 @@ GEM erubi (1.7.0) erubis (2.7.0) eventmachine (1.2.5) + exception_notification (4.2.2) + actionmailer (>= 4.0, < 6) + activesupport (>= 4.0, < 6) execjs (2.7.0) ffi (1.9.18) font-awesome-rails (4.7.0.2) @@ -284,6 +287,7 @@ DEPENDENCIES capybara (~> 2.13) dotenv-rails email_address + exception_notification font-awesome-rails haml-rails jbuilder (~> 2.5) diff --git a/config/environments/production.rb b/config/environments/production.rb index 09bc44c5..5d3ad7d3 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -84,4 +84,18 @@ Rails.application.configure do # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false + + # Recibir por mail notificaciones de excepciones + config.action_mailer.default_url_options = { host: 'sutty.kefir.red' } + config.action_mailer.perform_deliveries = true + config.action_mailer.raise_delivery_errors = true + config.action_mailer.delivery_method = :sendmail + config.action_mailer.default_options = { from: 'sutty@kefir.red' } + + config.middleware.use ExceptionNotification::Rack, + email: { + email_prefix: '[ERROR]', + sender_address: %(sutty@kefir.red), + exception_recipients: 'sysadmin@kefir.red' + } end