I had a similar problem with Rails 3.X, although the mangooid Gem was included in my Gemfile. I could solve the problem by explicitly requiring a database.rake file from a mangooid gem. I added these 2 lines to my Rakefile:
spec = Gem::Specification.find_by_name 'mongoid' load "#{spec.gem_dir}/lib/mongoid/railties/database.rake"
This works for me.
source share