Docs Menu

Upgrade Driver Versions

In this section, you can identify the changes you must make to your application to upgrade your driver to a new version.

Before you upgrade, perform the following actions:

  • Ensure the new driver version is compatible with the MongoDB Server versions your application connects to and the Ruby versions your application runs on. To view compatibility information, see the Compatibility page.

  • Address any breaking changes between the current version of the driver your application is using and your planned upgrade version in the Breaking Changes section.

Starting with version 2.18.0, the driver uses feature flags to manage breaking changes. This feature allows you to opt into breaking changes before the next major version release.

Each Ruby driver release has a version number in the format MAJOR.MINOR.PATCH. The Ruby driver uses Semantic Versioning (SemVer), which typically means:

  • Breaking changes, enablement of new functionality, and removal of deprecated functionality will only be done in major version releases.

  • New functionality will be added using feature flags, which must be enabled via an opt-in configuration change. These feature flags may be added in either major or minor releases.

  • Functionality may be marked as deprecated in either major or minor releases, but will not be removed until the next major release, at the earliest.

  • Patch version releases will contain only non-breaking fixes and security updates.

A breaking change is a modification in a convention or behavior in a specific version of the driver that might prevent your application from working properly if you don't address it before upgrading.

The breaking changes in this section are categorized by the driver version that introduced them. When upgrading driver versions, address all the breaking changes between the current and upgrade versions.

This driver version introduces the following breaking change:

  • Discontinues support for Ruby 2.5 and 2.6. Deprecates support for Ruby 2.7 and JRuby 9.2.