Using the MongoDB Ruby driver in Rails? (without an object mapper)
I have recently been getting my feet wet in MongoDB using Mongoid w/ Rails 3, but 开发者_JS百科I'm now interested in learning the low level MongoDB features using only the Ruby driver, and trying some map/reduce that would not be possible through Mongoid (afaik)
I'm not entirely sure where in Rails I should be setting up the db connections etc, and any pointers would be much appreciated!
check out the docs over at mongodb
http://www.mongodb.org/display/DOCS/Rails+-+Getting+Started
I have no personal experience with mongo (hopefully soon), i've only watched some online presentations so far, looks really cool!
EDIT: this one looks like its specific to the ruby driver http://www.mongodb.org/display/DOCS/Ruby+Tutorial
some other resources I have been checking out over the last month you might find useful?
- http://www.10gen.com/event_mongosf_10apr30 (a bunch of really good presentations on mongodb; many using ruby)
- http://vimeo.com/11323139 (Schema Design with MongoDB) this one takes a few minutes to get going and the sound and video quality are not the best, but has good info
- if I recall most map/reduce can be handled via javascript functions that get passed to the mongodb server, see below screen shot taken from the vimeo screen cast
精彩评论