0.0
No commit activity in last 3 years
No release in over 3 years
JavaScript error notifications for Rails.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.0
~> 4.2.5
 Project Readme

Tastes Bitter

Get an email notification when a JavaScript error occurs in your Rails application.

How it works

The JavaScript hooks into the window.onerror event by sending an XHR with the error data which is then emailed.

Install

Add the gem to your Gemfile.

gem 'tastes_bitter'

Use Bundler to install it.

$ bundle install

Run the install generator.

$ bundle exec rails generate tastes_bitter:install

Configure

Open config/initializers/tastes_bitter.rb and update the configuration.

TastesBitter.configure do |config|

  config.mailer_receiver = "notifications@example.com"
  config.mailer_sender = "notifications@example.com"
  config.mailer_subject_prefix = "[JavaScript Error] "

end

Make sure you have ActionMailer configured in order for emails to be sent.

Add the JavaScript file to application.js.

//= require tastes_bitter/javascript_errors

It does matter where you include the JavaScript. It will only catch errors that occur after it has been loaded into the page. In general, you'll want to include it around the top of application.js. This will ensure it catches all errors from any other JavaScript code in your application.