Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Single collection inheritance now requires connecting to database in version 0.12.0 #460

kbullaughey opened this Issue · 4 comments

3 participants


In 0.11.1, I can do this without mongo running:

require 'mongo_mapper'
class A; include MongoMapper::Document; end
class B < A; end

But in 0.12.0, for some reason it tries to connect to the database and I get an error:

Mongo::ConnectionFailure: Failed to connect to a master node at localhost:27017

It seems like defining classes shouldn't require a connection to the database.


btw, this only happens with the current master head, not the 0.12.0 version in rubygems.


This is pretty problematic for us as well, has it been addressed yet?


John, perhaps consider:

# @api public
def connection
  @@connection ||= => !ENV['MONGODB_URI'].nil?)

@paulwalker consider that where?

@cheald cheald closed this in 1456861
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.