Read more

MongoMapper for Rails 2 on Ruby 1.9

Arne Hartherz
March 01, 2013Software engineer at makandra GmbH

MongoMapper is a MongoDB Show archive.org snapshot adapter for Ruby. We've forked it so it works for Rails 2.3.x applications running on Ruby 1.9. [1]

Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot

makandra/mongomapper is based on the "official" rails2 branch [2] which contains commits that were added after 0.8.6 was released. Tests are fully passing on our fork Show archive.org snapshot for Ruby 1.8.7, REE, and Ruby 1.9.3.

To use it, add this to your Gemfile:

gem 'mongo_mapper', :git => 'git://github.com/makandra/mongomapper.git', :branch => 'rails2'

[1] The last version to be compatible with Rails 2 was 0.8.6: While there are 1.8/1.9 switches in the original code, one essential fix for Ruby 1.9's API change of Module.const_defined? was missing.

[2] Changes for replica sets were reverted (since their tests were not passing) and some tests were fixed.

Posted by Arne Hartherz to makandra dev (2013-03-01 19:16)