ryanong / mongoid_spacial

A Mongoid Extention that simplifies and adds support for MongoDB Geo Spacial Calculations.
MIT License
138 stars 63 forks source link

Simple spacial not working. #35

Open paterson opened 11 years ago

paterson commented 11 years ago

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? :)

arthurnn commented 11 years ago

which version of mongoid are you using?

ausangshukla commented 11 years ago

I have the exact same issues. I'm using mongoid 3.1.4. Any help is much appreciated

mkalygin commented 11 years ago

Same problem here. I'm using mongoid 3.1.4. Any clues?

pSenthil202 commented 9 years ago

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.