Skip to content

Instantly share code, notes, and snippets.

@jondeandres
Created February 10, 2015 00:19
Show Gist options
  • Save jondeandres/e5a897b5a6394ae6bdbf to your computer and use it in GitHub Desktop.
Save jondeandres/e5a897b5a6394ae6bdbf to your computer and use it in GitHub Desktop.
Report booting Rails errors to Rollbar
# config/environment.rb
require File.expand_path('../application', __FILE__)
require File.expand_path('../rollbar', __FILE__)
begin
Rails.application.initialize!
rescue Exception => e
Rollbar.error(e)
raise
end
# config/rollbar.rb
## Move config/initializers/rollbar.rb content to here. Just configure it as usual.
Rollbar.configure do |config|
config.access_token = 'your-access-token'
config.framework = 'Rails'
config.enabled = true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment