⚡ Sangsakala Proxy 🏠 Home
Skip to content

Releases: mongodb/mongo-ruby-driver

2.26.0

Choose a tag to compare

@mongodb-dbx-release-bot mongodb-dbx-release-bot released this 10 Sep 16:54
8405041

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

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

gem install -v 2.26.0 mongo

Or simply add it to your Gemfile:

gem 'mongo', '2.26.0'

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

New Features

Add option to configure DEK cache lifetime (RUBY-3524 | PR)

Adds a new option to the Mongo::Client constructor: :key_expiration_ms. This is used to specify the lifetime of the data encryption key cache, in milliseconds. Must be a non-negative integer. A value of 0 means the cache never expires. Defaults to 60000.

Client backpressure with baseBackoffMS (RUBY-3901 | PR)

Improved performance for MongoDB 9.0’s Intelligent Workload Management (IWM) by only retrying overload errors when doing so is expected to not worsen server conditions.

Other New Features

  • Add QE text queries (prefix/suffix/substring) (RUBY-3903 | PR)

Bug Fixes

  • Disallow comma in authMechanismProperties connection string value (RUBY-3482 | PR)
  • Fix libmongocrypt version floor, ClientEncryption timeout_ms and missing range_opts (RUBY-3903 | PR)
  • Consult server-side encryptedFields when dropping QE collections (PR)
  • Use exact match for file ID in GridFS methods (CVE-2026-88030)

2.25.0

Choose a tag to compare

@mongodb-dbx-release-bot mongodb-dbx-release-bot released this 22 Jul 17:43
049b718

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

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

gem install -v 2.25.0 mongo

Or simply add it to your Gemfile:

gem 'mongo', '2.25.0'

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

New Features

Support $lookup in CSFLE/QE (RUBY-3611 | PR)

You can now use $lookup in aggregation pipelines that reference CSFLE- and QE-enabled collections.

Allow keyAltName in encrypted fields map (RUBY-3773 | PR)

When defining the encrypted fields for a collection (for use with Queryable Encryption), you may now specify the key via the keyAltName field, instead of by directly referencing a keyId.

Deprecate legacy retry tuning options (RUBY-3703 | PR)

The following options are deprecated when set on a Mongo::Client:

  • :max_read_retries
  • :read_retry_interval
  • :max_write_retries

These relate only to the legacy retry feature, which is itself deprecated and slated for removal. Modern
retryable reads and writes are enabled by default and ignore these options.

Deprecate server version 4.2 (RUBY-3811 | PR)

MongoDB server version 4.2 is EOL, and support for it will be removed from the driver in a future driver release. If you are using MongoDB server version 4.2, please upgrade to a newer version soon.

Other New Features

  • Add Database#cursor_command to create a cursor from a command response (RUBY-3213 | PR)
  • Support delegated protocol for CSFLE/QE KMIP (RUBY-3383 | PR)
  • Support named KMS providers (type:name format) (RUBY-3363 | PR)
  • Raise on invalid tls/ssl boolean URI option (RUBY-3832 | PR)
  • Wrap error when mongocrypt_kms_ctx_fail returns false (RUBY-3601 | PR)

Bug Fixes

  • redact credentials in URI rendering and InvalidURI errors (RUBY-3835 | PR)
  • Fix raise_on_invalid handling and protect SRV monitor thread (RUBY-3838 | PR)
  • Don't leak connections in load-balanced topology (PR)
  • Fix secondaryPreferred non-compliance with server selection spec (RUBY-3768 | PR)
  • Keep MemoryPointer alive in Binary.wrap_string (RUBY-3840 | PR)
  • Stop publishing SDAM events from the Monitor's RTT checks (RUBY-3822 | PR)
  • Send afterClusterTime on writes in causally-consistent sessions (RUBY-3820 | PR)
  • Close monitoring connection when server marked Unknown from network error (RUBY-3909 | PR)
  • Don't append read/write concerns to search index helpers (RUBY-3351 | PR)

2.23.1

Choose a tag to compare

@mongodb-dbx-release-bot mongodb-dbx-release-bot released this 21 May 12:47
172becd

The MongoDB Ruby team is pleased to announce version 2.23.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.23.x series of MongoDB Ruby Driver.

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

gem install -v 2.23.1 mongo

Or simply add it to your Gemfile:

gem 'mongo', '2.23.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

2.24.1

Choose a tag to compare

@mongodb-dbx-release-bot mongodb-dbx-release-bot released this 20 May 06:24
5d2041a

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)

2.24.0

Choose a tag to compare

@mongodb-dbx-release-bot mongodb-dbx-release-bot released this 20 Apr 16:13
f68d676

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

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

gem install -v 2.24.0 mongo

Or simply add it to your Gemfile:

gem 'mongo', '2.24.0'

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

New Features

  • Added support for MongoDB's Intelligent Workload Management (IWM) and ingress connection rate limiting features. The driver now gracefully handles write-blocking scenarios and optimizes connection establishment during high-load conditions to maintain application availability. Note that these features require MongoDB Atlas Server Version 9.0+.

    • Supported on all commands.
    • Custom application retry logic may need to be adjusted to avoid retrying too long.
    • Upgrade is recommended to avoid impacts of server changes related to overload errors.
      • If not upgrading, custom application retry logic may need to be adjusted to handle higher rates of overload errors.
    • Add URI option maxAdaptiveRetries to configure the maximum number of retries for operations that fail with a SystemOverloadedError (default: 2).
    • Add URI option enableOverloadRetargeting to control whether retries of SystemOverloadedError will attempt to use a different server (default: false).
  • Added serverMonitoringMode option configures which server monitoring protocol to use. Valid modes are
    "stream", "poll", or "auto". The default value is "auto":

    • With "stream" mode, the client use the streaming protocol when the server supports it or fall back to the polling protocol otherwise.
    • With "poll" mode, the client use the polling protocol.
    • With "auto" mode, the client behave the same as "poll" mode when running on a FaaS platform or the same as "stream" mode otherwise. The client detects that it's running on a FaaS platform via the same rules for generating the client.env handshake metadata field in the MongoDB Handshake spec.
  • RUBY-3381 RUBY-3640 Remove support for server versions 3.6 and 4.0 (PR)

Bug Fixes

2.23.0

Choose a tag to compare

@mongodb-dbx-release-bot mongodb-dbx-release-bot released this 04 Feb 17:30
1708c3d

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

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

gem install -v 2.23.0 mongo

Or simply add it to your Gemfile:

gem 'mongo', '2.23.0'

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

New Features

RUBY-3612 OpenTelemetry (PR)

When the feature is enabled, Ruby driver traces driver operation and the corresponding server commands nested under the operation. Tracing can be enabled per Mongo::Client instance (by setting the tracing option to true), or globally via the OTEL_RUBY_INSTRUMENTATION_MONGODB_ENABLED environment variable.

RUBY-3552 and RUBY-3588 Deprecate support for server versions 3.6 and 4.0

Support for MongoDB server versions 3.6 and 4.0 is now deprecated, and will be removed in version 2.24.0 of the Ruby driver. If you are using MongoDB server version 4.0 or older, please upgrade to at least version 4.2.

Other New Features

  • Add csfle_convert_to_ruby_types config option for converting encryption types (PR)
  • RUBY-3714 Client metadata capture for TruffleRuby (PR)
  • RUBY-3519 Allow valid SRV hostnames with less than 3 parts (PR)
  • Ruby 4.0 Support (PR)

Bug Fixes

2.22.0

Choose a tag to compare

@mongodb-dbx-release-bot mongodb-dbx-release-bot released this 24 Nov 21:28
0b3078e

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

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

gem install -v 2.22.0 mongo

Or simply add it to your Gemfile:

gem 'mongo', '2.22.0'

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

New Features

  • RUBY-3520 Sort option for updateOne and replaceOne (PR)

Bug Fixes

2.20.2

Choose a tag to compare

@mongodb-dbx-release-bot mongodb-dbx-release-bot released this 20 Aug 16:21
ee03e8f

The MongoDB Ruby team is pleased to announce version 2.20.2 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.20.x series of the MongoDB Ruby Driver.

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

gem install -v 2.20.2 mongo

Or simply add it to your Gemfile:

gem 'mongo', '2.20.2'

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-3694 Use correct CA when verifying OCSP endpoint (PR)

2.21.3

Choose a tag to compare

@mongodb-dbx-release-bot mongodb-dbx-release-bot released this 19 Aug 17:36
d0cd1ac

The MongoDB Ruby team is pleased to announce version 2.21.3 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.21.x series of the MongoDB Ruby Driver.

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

gem install -v 2.21.3 mongo

Or simply add it to your Gemfile:

gem 'mongo', '2.21.3'

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-3694 Use correct CA when verifying OCSP endpoint (PR)

2.21.2

Choose a tag to compare

@mongodb-dbx-release-bot mongodb-dbx-release-bot released this 15 Jul 18:21
17f8c4a

The MongoDB Ruby team is pleased to announce version 2.21.2 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.21.x series of the MongoDB Ruby Driver.

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

gem install -v 2.21.2 mongo

Or simply add it to your Gemfile:

gem 'mongo', '2.21.2'

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