Open edgarf opened 4 years ago
Add the Airbrake Ruby gem to your Gemfile:
gem 'airbrake-ruby'
Invoke the following command from your terminal:
gem install airbrake-ruby
Just require the library and copy this configuration snippet into your Ruby project:
require
(You can find your project ID and API key in your project's settings)
require 'airbrake-ruby' Airbrake.configure do |c| c.project_id = <Your project ID> c.project_key = '<Your project API KEY>' end
Uncaught errors are automatically sent to Airbrake. Caught errors can be sent to Airbrake using the notify method:
notify
begin 1/0 rescue ZeroDivisionError => ex Airbrake.notify(ex) end
For in depth examples and advanced configuration options like error filtering or custom parameters, please visit our official GitHub repo.
Installation
Option 1: Bundler
Add the Airbrake Ruby gem to your Gemfile:
Option 2: Manual
Invoke the following command from your terminal:
Configuration
Just
require
the library and copy this configuration snippet into your Ruby project:(You can find your project ID and API key in your project's settings)
Uncaught errors are automatically sent to Airbrake. Caught errors can be sent to Airbrake using the
notify
method:Configuration
For in depth examples and advanced configuration options like error filtering or custom parameters, please visit our official GitHub repo.