-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Ruby 4.0 extracts the logger gem as a bundled gem. Therefore, the mongo gem must add the logger gem to its gemspec in order to support Ruby 4.0.
Otherwise, the following warning will be raised:
```
/opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/gems/4.0.0/gems/mongo-2.22.0/lib/mongo.rb:21: warning: logger used to be loaded from the standard library, but is not part of the default gems since Ruby 4.0.0.
You can add logger to your Gemfile or gemspec to fix this error.
````
References:
- Ruby 4.0 Release note
- the mongo gem requires it from lib/mongo.rb