Download Latest Version 2.26.0 source code.zip (3.2 MB)
Email in envelope

Get an email when there's a new version of MongoDB Ruby Driver

Home / v2.24.1
Name Modified Size InfoDownloads / Week
Parent folder
mongo-2.24.1.gem 2026-05-20 465.9 kB
mongo-2.24.1.gem.sig 2026-05-20 833 Bytes
2.24.1 source code.tar.gz 2026-05-20 1.4 MB
2.24.1 source code.zip 2026-05-20 2.8 MB
README.md 2026-05-20 2.6 kB
Totals: 5 Items   4.7 MB 0

The MongoDB Ruby team is pleased to announce version 2.24.1 of the mongo gem - a pure-Ruby driver for connecting to, querying, and manipulating MongoDB databases. This is a new patch release in the 2.24.x series of MongoDB Ruby Driver.

Install this release using RubyGems via the command line as follows:

gem install -v 2.24.1 mongo

Or simply add it to your Gemfile:

gem 'mongo', '2.24.1'

Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.

Bug Fixes

  • RUBY-3831 Skip OpenTelemetry command spans for sensitive commands (PR)
  • RUBY-3456 Suppress no-op SDAM debug log lines (PR)

New Features

RUBY-3602 Include server address in OperationFailure and BulkWriteError messages (PR)

  • New Mongo::Config.include_server_address_in_errors flag (default false). When true, Mongo::Error::OperationFailure and Mongo::Error::BulkWriteError messages are suffixed with (on host:port) so users can identify which server produced the error.
  • Both #message and #to_s render the suffix, since it's baked into the string passed to super at construction. ResultCombiner accumulates unique addresses across split bulk batches so multi-server bulks produce (on h1:27017, h2:27017).
  • Default-off behavior is byte-identical to current. No breaking changes. Planned to stay opt-in (no default flip).

RUBY-3220 Add databaseName property to command events (PR)

  • Sync find.yml from the command-logging-and-monitoring spec so commandSucceededEvent and commandFailedEvent expectations include databaseName. Schema bumped from 1.1 to 1.15.
  • The Ruby driver's event classes already exposed database_name on CommandStarted, CommandSucceeded, and CommandFailed, and the unified runner already supports asserting databaseName on any command event — this change exercises that path through the unified spec tests.

  • RUBY-3712 Expose atClusterTime in snapshot sessions (PR)

Source: README.md, updated 2026-05-20