mongoid_spacial
mongoid_spacial copied to clipboard
Simple spacial not working.
I've code like this:
field :geo, type: Array, spacial: true
spacial_index :geo
I've run rake db:mongoid:create_indexes
and I keep getting :
Problem:
Invalid index specification on CarPark: [[:geo, "2d"]], {}
Summary:
Indexes in Mongoid are defined as a hash of field name and direction/2d pairs, with a hash for any additional options.
Resolution:
Ensure that the index conforms to the correct syntax and has the correct options.
More here...
I'm sure I'm missing something really simple, what is it? :)
which version of mongoid are you using?
I have the exact same issues. I'm using mongoid 3.1.4. Any help is much appreciated
Same problem here. I'm using mongoid 3.1.4. Any clues?
Any solution for this issue , I am facing same mongoid (4.0.0) ?
Mongoid::Errors::InvalidIndex:
Problem: Invalid index specification on River: [[:source, "2d"]], {}
Summary: Indexes in Mongoid are defined as a hash of field name and direction/2d pairs, with a hash for any additional options.
Resolution: Ensure that the index conforms to the correct syntax and has the correct options.