问题
How to handle gem version mis-matches?
Mongoid 4.0.0 (latest) uses moped (2.0.0) which requires bson 2.3
Mongo 1.10.2 (latest) uses bson 1.10.2
I can't use mongoid 4.0.0 and mongo 1.10.2 together, but I could in the past, when mongoid uses bson 1.x.
Does anyone know how I can continue forward using both mongo and mongoid?
-daniel
Links:
- https://rubygems.org/gems/mongoid
- https://rubygems.org/gems/moped
- https://rubygems.org/gems/mongo
回答1:
The latest unstable version 2.x (under heavy development) of mongo-ruby-driver uses BSON 2.2. If you upgrade to this Gem you should be good to go.
https://github.com/mongodb/mongo-ruby-driver/blob/master/mongo.gemspec
来源:https://stackoverflow.com/questions/24395147/ruby-rails-mongoid-with-mongogem-a-bson-conflict-how-to-handle-different-ve