Created
November 16, 2011 21:56
Revisions
-
adamlwatson revised this gist
Nov 16, 2011 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ require 'em-synchrony/em-mongo' require 'mongoid' mongoid_conn = Mongo::Connection.new 'localhost', 27017, :pool_size => 10 -
adamlwatson created this gist
Nov 16, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ require 'mongoid' mongoid_conn = Mongo::Connection.new 'localhost', 27017, :pool_size => 10 Mongoid.configure do |config| begin config.master = mongoid_conn.db('dbname') rescue Exception=>err abort "An error occurred while creating the mongoid connection pool: #{err}" end end