Upgrading to Mongoid Beta 6

Just as a quick note, I had upgraded from Mongoid 2.0 Beta 4 to Mongoid 2.0 Beta 6 when I ran into some weird errors like:
ActionView::Template::Error (Database should be a Mongo::DB, not NilClass)
and
Mongoid::Errors::InvalidDatabase: Mongoid::Errors::InvalidDatabase

Essentially, you can keep your Mongoid code the way it is, but you need to put this line of code at the top of your config/application.rb:

require 'mongoid/railtie'
I hope that helps someone out there.

blog comments powered by Disqus