
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
rails_discord_notifier
Advanced tools
Send Rails exceptions to Discord via an incoming webhook
RailsDiscordNotifier is a lightweight gem that captures unhandled exceptions in your Rails application and delivers detailed error reports directly to a Discord channel via a configurable webhook. You own the codebase and can customize the format, embed fields, and delivery settings to suit your needs.
Add the gem directly from RubyGems.org by including it in your Gemfile:
gem "rails_discord_notifier", "~> 0.1.0"
Then install:
bundle install
Or use Bundler:
bundle add rails_discord_notifier
Generate the default initializer in your Rails app:
rails generate rails_discord_notifier:install
In config/initializers/rails_discord_notifier.rb
, configure your webhook and options:
RailsDiscordNotifier.configure do |config|
# Discord webhook URL (required)
config.webhook_url = ENV.fetch("DISCORD_WEBHOOK_URL")
# Bot username (optional, defaults to ENV["ERROR_BOT_NAME"] or "Error Bot")
config.username = ENV.fetch("ERROR_BOT_NAME", "Error Bot")
# Bot avatar URL (optional)
# config.avatar_url = ENV.fetch("ERROR_BOT_AVATAR_URL", nil)
end
Ensure the middleware is loaded (added automatically by the Railtie).
Any uncaught exception in your controllers or middleware stack will now send an embed to Discord before re-raising.
Option | Type | Default | Description |
---|---|---|---|
webhook_url | String | Required | Discord incoming webhook URL |
username | String | fetched from ENV ERROR_BOT_NAME (defaults to "Error Bot" ) | Bot display name |
avatar_url | String | fetched from ENV ERROR_BOT_AVATAR_URL (defaults to nil ) | URL of the bot avatar image |
bin/setup
to install dependenciesbundle exec rspec
to execute the test suitegem build rails_discord_notifier.gemspec
gem install ./rails_discord_notifier-#{RailsDiscordNotifier::VERSION}.gem
lib/rails_discord_notifier/version.rb
and run:
bundle exec rake release
Bug reports and pull requests are welcome on GitHub: https://github.com/gettinDrikkieWithIt/rails_discord_notifier
Please follow the project’s Code of Conduct.
This gem is available as open source under the terms of the MIT License.
See LICENSE.txt for details.
FAQs
Unknown package
We found that rails_discord_notifier demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.