Saya telah memecahkan ini dengan menambahkan:
Mongoid.load!(Rails.root.join("/config/mongoid.yml"))
ke config/intializers/mongoid.rb
, sesuai tutorial.
Anda juga harus mengubah baris berikut di file config/application.rb Anda dari:
require 'rails/all'
ke (dalam 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+
atau (di 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"