apneadiving / Google-Maps-for-Rails

Enables easy Google map + overlays creation in Ruby apps
https://apneadiving.github.io/
MIT License
2.26k stars 382 forks source link

Rails4 and Mongodb #377

Closed xhijack closed 10 years ago

xhijack commented 11 years ago

Hi,

I just used gem google maps for rails. but when do rails s. it showed

Problem: Invalid option :geo provided for field :location. Summary: Mongoid requires that you only provide valid options on each field definition in order to prevent unexpected behaviour later on. Resolution: When defining the field :location on 'User', please provide valid options for the field. These are currently: as, default, identity, label, localize, metadata, pre_processed, subtype, type, overwrite. If you meant to define a custom field option, please do so first like so:

  Mongoid::Fields.option :geo do |model, field, value|     # Your logic here...   end   class User     include Mongoid::Document     field :location, geo: true   end

I use Rails4, ruby2, I have User Model where integrated devise. and I use mongodb for database. May I know what's the problem?

apneadiving commented 10 years ago

I dont even see why you assume your issue is related to the gem