Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Ruby drive 2.x

31 views
Skip to first unread message

Jamie Orchard-Hays

unread,
Dec 4, 2018, 4:53:59 PM12/4/18
to mongo...@googlegroups.com
I’m curious if any of you have info on the Mongo Ruby 2.x driver API choices. I’ve looked at it a few times and I do not understand why it is not consistent with the Mongo shell and other drivers I look at. No save(), no find_one(), etc. Anyone have a clue why?

Also, anyone moved to 2.x with MM? I had started investigating this with updates to a branch, but it will be a monumental effort whether moving to MM on 2.x or Mongoid.

Jamie

PS If I’d waited a week, it’d would be exactly a year since the last post on this group.

Jon Kern

unread,
Dec 5, 2018, 8:55:37 AM12/5/18
to mongo...@googlegroups.com
As much as I love and prefer MongoMapper, I use Mongoid on another major project. 

Sadly, I must be a superficial consumer of the ORM. I am not even sure I understand what you mean by moving to the 2.x with MM. I assume you mean local experimentation in the repo with using a more modern version of the mongo gem?

mongo_mapper (0.13.1)
activemodel (>= 3.0.0)
activesupport (>= 3.0)
mongo (~> 1.8)
plucky (~> 0.6.5)
I don’t feel like I am a good enough ruby coder to work on the mongo_mapper gem source.

And yea, I see 9 Dec 2017 as the last post prior to this.
--
You received this message because you are subscribed to the Google
Groups "MongoMapper" group.
For more options, visit this group at
http://groups.google.com/group/mongomapper?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups "MongoMapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongomapper...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jamie Orchard-Hays

unread,
Dec 5, 2018, 10:38:43 AM12/5/18
to mongo...@googlegroups.com
Frederick Cheung made a branch of MM to work with Ruby driver 2.x, and made a PR for it: https://github.com/mongomapper/mongomapper/pull/638

I used that branch in a branch of my app to do a spike over a year ago to investigate how it worked, how much work I thought it would be, etc. One of the first shocks I had was the the API of driver 2.x had diverged not just from 1.x, but also from other Mongodb drivers. Whenever I have a look, I just think, WTF? Especially as Mongodb owns and maintains the driver. (If I were making a driver, I would keep as close to the shell’s API as possible.)

I ended up writing some adaptors so that some of my driver-level code would continue to work, but ultimately, I didn’t have the resources (time, people) to make a move and we had many higher priorities. Also, the fact that Mongoid is now the official Mongodb ODM for Rails from Mongodb and that MM is clearly not being developed or maintained, means that I didn’t want to embark on such a conversion to Frederick’s branch.

Unfortunately, I see no way to use both the 1.x and 2.x drivers at the same time, or I would use both and start converting piecemeal. 

Scott Taylor

unread,
Sep 13, 2020, 10:25:12 PM9/13/20
to MongoMapper
Hi Jamieorc + et. all,

I'm a maintainer on MongoMapper but haven't been working on it for a long time as I haven't been using Mongo (the company I was at which was using it got acquired).  

I've recently starting using mongo on another project and this time I'm using Frederick Cheung's 2.0 branch.  I'm considering releasing it as 0.15.0 after making some other minor changes.  

I definitely feel your pain on the driver; it really is a shame that they haven't made it compatible with the shell methods.  Maybe you'd be willing to share the code you've used as a compatibility layer?

Also, I'd have to talk to Chris Heald and John Nunemaker about this, but I've thought that this project could really benefit from an open commit policy a la rubinius.  

Will post to the list if/when I release 0.15.0.

Cheers,

Scott Taylor
@smtlaissezfaire

Chris Heald

unread,
Sep 13, 2020, 11:57:21 PM9/13/20
to mongo...@googlegroups.com
I'm not actively using Mongo right now, and thus am probably not the best person to be maintaining things right now. I'm fine with an open commit policy if other folks feel it would be the best path to improve the health of the project.

Reply all
Reply to author
Forward
0 new messages