On this page
Overview
Bullet is a Ruby gem that watches database access during development and detects N+1 queries, unused eager loading, and COUNT queries that could use a counter cache. Notifications can go to local logs and the browser as well as services such as Sentry, Slack, and OpenTelemetry.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Detect N+1 queries and point to eager-loading fixes
Bullet watches ActiveRecord and Mongoid association access and reports repeated related-record loads. Its logs identify the model and association and suggest where eager loading such as includes may be needed.
Sources: [1]
Find unused eager loading and counter-cache opportunities
Separate detectors report associations that were preloaded but not used and COUNT patterns that can be replaced by a counter cache. Individual detectors can be enabled or disabled.
Sources: [1]
Route notifications to logs, Sentry, Slack, OpenTelemetry, and more
Bullet can notify through its own log, the Rails log, browser console, and integrations including Sentry, Honeybadger, Bugsnag, AppSignal, Airbrake, Rollbar, Slack, and OpenTelemetry.
Sources: [1]
Best fit
Fits Rails and Mongoid applications catching query inefficiencies before production
It is useful when application requests should expose ORM query patterns early enough to fix N+1 queries and excessive preloading. Bullet.raise = true can also turn findings into test failures.
Sources: [1]
Before adoption
Version 8.2.0 drops ActiveRecord below 7 and Mongoid below 8
The 8.2.0 changelog drops support for ActiveRecord versions older than 7 and Mongoid versions older than 8. The gemspec also requires Ruby 2.7 or newer, so existing applications should check the full compatibility set before upgrading.
Prefer development or staging and use thread-safe runtime controls
The README recommends Bullet for development or custom environments such as staging. It also warns against toggling the global Bullet.enable flag at runtime and recommends Bullet.skip, pause, and resume for thread-safe control.
Official sources
- [1]Bullet 8.2.0 source snapshot README(2026-10-04)
- [2]Bullet 8.2.0 changelog(2026-10-04)
- [3]Bullet 8.2.0 gemspec(2026-10-04)
Supplemental curator note
Bullet is most useful as immediate development feedback for ORM query patterns rather than as a replacement for production APM. Version 8.2.0 assumes ActiveRecord 7+ or Mongoid 8+, so older Rails stacks need explicit version compatibility checks.
Try it in 3 steps
- 1
Add Bullet 8.2.0 to a Rails application for development
Bullet 8.2.0 expects ActiveRecord 7 or newer. Pin it in the development group of an existing Rails application.
cd your-rails-app && bundle add bullet --version 8.2.0 --group development - 2
Generate the default Bullet configuration
Run the upstream README's generator to add development configuration. The generator can also offer to enable Bullet in the test environment.
cd your-rails-app && bundle exec rails g bullet:install - 3
Verify the loaded version and enabled state
Confirm that version 8.2.0 loads before starting the application. Exercise development requests and inspect
log/bullet.logor another configured notifier to observe actual N+1 findings.cd your-rails-app && bundle exec rails runner 'puts "Bullet #{Bullet::VERSION} enabled=#{Bullet.enable?}"'
Growth
Growth trends · Last 30 days
7,337 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 0
- Open PRs
- 6
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- Tabularis5,109 Stars
1 shared tag(s) · 2 shared category(s)
combine SQL editing, notebooks, database plugins, and MCP in one desktop workspace
TypeScript - mysql22,276 Stars
2 shared tag(s) · 2 shared category(s) · Same language
connect Ruby to MySQL or MariaDB and handle SQL queries, prepared statements, and streaming results
Ruby - Ransack5,858 Stars
2 shared tag(s) · 1 shared category(s) · Same language
add searching, filtering, and sorting to ActiveRecord-backed Rails apps without a separate search service
Ruby - AASM5,229 Stars
2 shared tag(s) · 1 shared category(s) · Same language
model states, events, and transitions as finite state machines in plain Ruby and ORM-backed classes
Ruby - claude-usage2,244 Stars
2 shared tag(s) · 1 shared category(s)
Audit Claude Code tokens, estimated cost, sessions, and subagents by aggregating local JSONL transcripts into SQLite for CLI, web, and VS Code
Python - RepoBar2,198 Stars
2 shared tag(s) · 1 shared category(s)
Aggregate GitHub issues, PRs, CI, releases, API quotas, and local Git state in a macOS menu bar app and CLI
Swift
Report incorrect information
Tell us if any listing information is incorrect or outdated.