For a simple Ruby wrapper around CouchDB's RESTful API, see http://github.com/couchrest/couchrest, which keeps you fairly close the metal and is used as a driver in many other CouchDB ruby libraries. For a more Rails-like experience check out couchrest's companion library CouchRest Model which uses ActiveModel and includes support for typecasting, validations, basic associations, proxying (dynamically generated databases), and a powerful yet simple DSL for manipulating views and their results.

CouchRest Model can be easily installed in your Rails 3 project's Gemfile:

 gem couchrest_model 

or manually:

 gem install couchrest_model 


For parallel query execution, try Slipcover.


You can get started fairly quickly using Couch Object

To download the edge version using git, run git clone git://gitorious.org/couchobject/mainline.git

CouchObject gives you an easy way to connect to and work with CouchDB. Its main strengths are that it lets you save and load Ruby objects to and from the database using the CouchObject::Persistable module.

As of version 0.6 it supports has_many, has_one and belongs_to relations, in addition to amongst others time stamps. Please have a look at the Rdoc for more information.


Alternatively, the DataMapper Ruby ORM has a CouchDB adapter (just install the dm-core gem for datamapper and the dm-more gem for the adapter).


RelaxDB offers a similar idiom to ActiveRecord for persisting objects to CouchDB as is Couch Potato


A quick note: If you have any problems like bad_utf8_character_code make sure you use unicode:

$KCODE='u'
require 'jcode'

and use active_support 'chars' method.


CouchTiny is an experimental library inspired by CouchRest but designed to be closer to the metal, with a smaller and simpler code base. It does not have properties or validations.


CouchFoo is an ActiveRecord-style interface to CouchDB. Basic operations (creating records, finding, and even dynamic finders) are much the same as with ActiveRecord, but there have been some additions to deal with the differences in CouchDB (such as defining properties to get typing or view definitions). Associations (has_many, etc) also work as expected.


ActiveCouch – a ruby on rails experienced library in the spirit of ActiveResource and ActiveRecord for CouchDB.

RubyLibrary (last edited 2011-08-26 05:17:41 by lyker)