Ruby driver 2.20.0

Version 2.20.0 of the Ruby driver for MongoDB is released. This adds the following new features:

  • Connection strings no longer require a slash between the hosts and the options. E.g., “mongodb://” and “mongodb://” are both valid connection strings now. (

  • Container runtime and orchestration metadata for the client environment are now sent to the server for analytics purposes. (

  • When connecting to a CosmosDB (Azure) or DocumentDB (Amazon) instance, a warning message will now be logged. (

  • When attempting a retry of a read or write operation in a sharded topology, the retry will be attempted on a different mongos instance, if possible. (

  • Add support for the newly-released Ruby-BSON version 5.0.

  • Support for Ruby 2.5 and 2.6 has been discontinued. Support for Ruby 2.7 and JRuby 9.2 has been deprecated, and will be discontinued in a future driver version. Support for JRuby 9.4 has been added.

This release also fixes the following user-facing issues: