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 online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
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)