Driver Compatibility¶
MongoDB Compatibility¶
The following compatibility table specifies the recommended version(s) of the MongoDB Ruby driver for use with a specific version of MongoDB.
The first column lists the driver versions.
Ruby Driver | MongoDB 4.2 | MongoDB 4.0 | MongoDB 3.6 | MongoDB 3.4 | MongoDB 3.2 | MongoDB 3.0 | MongoDB 2.6 | MongoDB 2.4 |
---|---|---|---|---|---|---|---|---|
2.12 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
2.11 | ✓ [2] | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
2.10 | ✓ [1] [2] | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
2.9 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
2.8 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
2.7 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
2.6 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
2.5 | ✓ | ✓ | ✓ | ✓ | ✓ | |||
2.4 | ✓ | ✓ | ✓ | ✓ | ✓ | |||
2.3 | ✓ | ✓ | ✓ | ✓ | ||||
2.2 | ✓ | ✓ | ✓ | ✓ | ||||
2.0 | ✓ | ✓ | ✓ |
[1] | Polling of SRV records in sharded topologies is implemented as of driver version 2.11. |
[2] | (1, 2) Client-side encryption is implemented as of driver version 2.12. |
The driver does not support older versions of MongoDB.
Ruby Compatibility¶
The following compatibility table specifies the recommended version(s) of the MongoDB Ruby driver for use with a specific version of Ruby.
The first column lists the driver versions. “D” in a column means support for that Ruby version is deprecated.
Ruby Driver | Ruby 2.7 | Ruby 2.6 | Ruby 2.5 | Ruby 2.4 | Ruby 2.3 | Ruby 2.2 | Ruby 2.1 | Ruby 2.0 | Ruby 1.9 | JRuby 9.2 | JRuby 9.1 | JRuby |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2.12 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||
2.11 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||
2.10 | ✓ | ✓ | ✓ | ✓ | ✓ | D | D | D | D | ✓ | ✓ | |
2.9 | ✓ | ✓ | ✓ | ✓ | D | D | D | D | ✓ | ✓ | ||
2.8 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
2.7 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
2.6 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
2.5 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||
2.4 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||
2.3 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||
2.2 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||
2.1 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||
2.0 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
The driver does not support older versions of Ruby.
Rails/ActiveSupport Compatibility¶
The Ruby driver does not depend on ActiveSupport. However, when an application uses ActiveSupport or Ruby on Rails, it must load the driver’s ActiveSupport compatibility code for behavior like time serialization to be correct:
Applications using Mongoid 7.0.6 or newer do not need to explicitly load the driver’s ActiveSupport code, since Mongoid automatically does so.
Atlas Compatibility¶
Driver version 2.6.1 or higher is recommended when using MongoDB Atlas, as this version has significant SSL performance improvements.
When running on JRuby and connecting to Atlas Free Tier, driver version 2.6.4 or higher and Java 8 or higher are required.
JRuby Kerberos¶
If the mongo_kerberos
gem is used for Kerberos authentication with JRuby, the the JVM system
property “sun.security.jgss.native” to will be set to “true” in order to facilitate the use of
the system cache of TGTs (e.g. TGTs obtained with kinit
). Any other use of the JGSS library
will also be affected by this setting, meaning any TGTs in the system cache will be available for
obtaining Kerberos credentials as well.