From b612c9d3008ce2d03e16de0501628d19520b5700 Mon Sep 17 00:00:00 2001 From: sanemat Date: Tue, 7 May 2013 05:53:30 +0900 Subject: [PATCH] Use mongoid connection instead of Mongo gem mongoid version > 3.0.0 use configure below: http://mongoid.org/en/mongoid/docs/installation.html#configuration I use stackoverflow answer: http://stackoverflow.com/questions/12511699/mongoid-uninitialized-constant-mongo-nameerror --- examples/lib/mongoid_models.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/lib/mongoid_models.rb b/examples/lib/mongoid_models.rb index e31a127..2369ae3 100644 --- a/examples/lib/mongoid_models.rb +++ b/examples/lib/mongoid_models.rb @@ -2,7 +2,7 @@ require 'mongoid' Mongoid.configure do |config| name = 'database_cleaner_test' - config.master = Mongo::Connection.new.db(name) + config.connect_to(name) end