0
我想使用mongoid_spacial
寶石,這裏是我的模型的外觀:未初始化的常量Mongoid ::空間::文檔:: ClassMethods ::蒙戈
class Place include Mongoid::Document include Mongoid::Spacial::Document field :name, :type => String field :source, type: Array, spacial: true field :mouth, type: Array, spacial: {lat: :latitude, lng: :longitude, return_array: true } spacial_index :source end
的錯誤是
uninitialized constant Mongoid::Spacial::Document::ClassMethods::Mongo MONGOID: Attempted to constantize Property, trying without namespacing. MONGOID: Failed to determine model from app/models/property.rb: NameError:uninitialized constant Mongoid::Spacial::Document::ClassMethods::Mongo`
任何幫助表示讚賞。