OSS TanbouSign in with GitHub

detect ActiveRecord and Mongoid N+1 queries, unused eager loading, and counter-cache opportunities during development

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
7,337
Primary language
Ruby
License
MIT
Repository last updated
Aug 29, 2026
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.

Sources: [2][3]

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.

Sources: [1][2]

Official sources

  1. [1]Bullet 8.2.0 source snapshot README(2026-10-04)
  2. [2]Bullet 8.2.0 changelog(2026-10-04)
  3. [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. 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. 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. 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.log or another configured notifier to observe actual N+1 findings.

    cd your-rails-app && bundle exec rails runner 'puts "Bullet #{Bullet::VERSION} enabled=#{Bullet.enable?}"'
Check the official README

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

GitHub data

GitHub dataView detailed GitHub data
Stars
7,337
Forks
457
Watchers
67
Open issues
0
Contributors
168
Owner type
User
Primary language
Ruby
License
MIT
Repository last updated
Aug 29, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?