Ik heb dit opgelost door toe te voegen:
Mongoid.load!(Rails.root.join("/config/mongoid.yml"))
naar config/intializers/mongoid.rb
, volgens de tutorial.
U moet ook de volgende regel in uw config/application.rb-bestand wijzigen van:
require 'rails/all'
naar (in Rails 3.x):
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require "rails/test_unit/railtie"
# require "sprockets/railtie" # Uncomment this line for Rails 3.1+
of (in Rails 4.x):
# Pick the frameworks you want:
# require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "sprockets/railtie"
require "rails/test_unit/railtie"