undefined method `schema_cache' for Mongo::Connection-Collection of common programming errors
Trying to add Mongodb to an existing app. And I’m getting this error. Not sure how to resolve it let alone understand it.
This comes from me trying to load up the homepage, and Devise is also making a call as so :
1: .grid_24
2: .center-stuff
3: - if user_signed_in?
4: = link_to 'Begin Lesson', esson_path, class: 'button-green'
5: - else
6: %p Welcome :)
The error
ActionView::Template::Error (undefined method `schema_cache' for #):
My user.rb file
class User < ActiveRecord::Base
include MongoMapper::Document
my initializer
require 'mongo_mapper'
MongoMapper.connection = Mongo::Connection.new
MongoMapper.database = "ai_project-#{Rails.env}"
Originally posted 2013-11-09 21:11:01.