bobthecow / genghis

The single-file MongoDB admin app
http://genghisapp.com
MIT License
1.45k stars 165 forks source link

genghisapp conflicts with mongoid #193

Closed alauper closed 9 years ago

alauper commented 9 years ago

I'm running a rails 4 app. The minimum version of mongoid is >= 4. But mongoid 4 depends on bson 2.3 (through moped). Genghisapp depends on mongo <= 1.9.0, which depends on bson 1.8.

So they can't currently coexist - I can't add "mount Genghis::Server.new, at: '/genghis' " to my routes file.

Bundler could not find compatible versions for gem "bson": In Gemfile: genghisapp (>= 0) ruby depends on mongo (<= 1.9.0, >= 1.8.0) ruby depends on bson (~> 1.8.0) ruby

mongoid (~> 4.0) ruby depends on moped (~> 2.0.0) ruby depends on bson (2.3.0)

bobthecow commented 9 years ago

Honestly, I'm not sure what to do about this… It looks like moped and the mongo ruby driver can't co-exist :-/

The mongo driver depends on bson=1.11.1, and moped depends on bson~>2.2.

I mean, I could rewrite Genghis to use moped instead of the mongo driver, but then it'd have the inverse problem any time someone tried using it with the native mongo driver.

bobthecow commented 9 years ago

Maybe @estolfo can help. Emily, am I understanding this correctly? Do you know how we can make the mongo ruby driver play nice with moped?

estolfo commented 9 years ago

Hi! Sorry for the delay. Could you possibly do this with different gemsets (assuming you're using rvm)? Would that be possible with the way your environment is setup?

alauper commented 9 years ago

Yes, running two separate gemsets would fix the collision. But I'm not sure how that would be possible based on my issue described above. It's all within the same rails app - the ODM is Mongoid and I'm trying to mount Genghis in my route file.

estolfo commented 9 years ago

In that case, unfortunately I don't think there's anything you can do. This issue will be resolved soon though when we release driver 2.0. @bobthecow Moped does not have the full feature set as the ruby driver does and once Mongoid starts using Ruby driver 2.0, you'll see less development on Moped. I wouldn't recommend putting in effort to rewrite Genghis to use Moped.

bobthecow commented 9 years ago

I didn't think it was worth rewriting. Do you have a sense for how far away ruby driver 2.0 is?

estolfo commented 9 years ago

I can't tell you an exact date but it's our top priority after server version 2.8 comes out. So very soon!

bobthecow commented 9 years ago

@estolfo Sweet. Thanks!

@alauper I'm going to close this issue, since it looks like it won't be resolvable (until Ruby driver 2.0)