0

I followed the directions here but when I run Location.all, I get

ActiveRecord::StatementInvalid: Could not find table 'locations'

Are there any extra setup steps or configuration required for using geokit-rails in a Rails 5 app? Does it have anything to do with the fact I'm still using Sqlite and haven't switched databases yet?

Tyler
  • 19,113
  • 19
  • 94
  • 151

1 Answers1

1

ActiveRecord::StatementInvalid: Could not find table 'locations'

The documentation refers to an example of how to setup geokit-rails in the model. The gem doesn't serve/ship with a ready-made table. You should generate the table instead. Assuming you already have Location model in your app, then generate a migration to create locations table

rails g migration create_locations

and do rake db:migrate

Pavan
  • 33,316
  • 7
  • 50
  • 76