0.0
No release in over 3 years
Lightweight Ruby gem that reports exceptions to an Oopsie instance. Includes Rack middleware for automatic capture and a manual reporting API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 2.0
~> 2.1
~> 13.0
~> 3.12
~> 1.50
~> 3.18
 Project Readme

oopsie-ruby

Lightweight Ruby gem that reports exceptions to an Oopsie instance.

  • Zero runtime dependencies (uses Ruby stdlib)
  • Rack middleware for automatic error capture
  • Manual Oopsie.report(e) API
  • Silent failures with optional on_error callback

Installation

Add to your Gemfile:

gem "oopsie-ruby"

Then run:

bundle install

Configuration

Oopsie.configure do |config|
  config.api_key = ENV["OOPSIE_API_KEY"]
  config.endpoint = "https://your-oopsie-instance.com"

  # Optional: called when error reporting itself fails
  config.on_error = ->(e) { Rails.logger.warn("Oopsie error: #{e.message}") }
end

Rails initializer

Create config/initializers/oopsie.rb:

Oopsie.configure do |config|
  config.api_key = Rails.application.credentials.oopsie_api_key
  config.endpoint = "https://your-oopsie-instance.com"
end

Rack Middleware

Add the middleware to automatically capture unhandled exceptions:

# config.ru
use Oopsie::Middleware

In Rails, add to config/application.rb:

config.middleware.use Oopsie::Middleware

The middleware reports the error and re-raises it, so your existing error handling is unaffected.

Manual Reporting

Report exceptions anywhere in your code:

begin
  do_something_risky
rescue => e
  Oopsie.report(e)
end

Oopsie.report never raises — if reporting fails, it silently swallows the error (or calls your on_error callback).

Requirements

  • Ruby >= 3.1

License

MIT