Before going in depth into any particular topic, I thought it would be useful to write a getting-started tutorial, walking through setting up and working with a simple example Rails app using RGeo. In this tutorial, we will:
- Install the main software components we need for a geospatial application, including a spatial database and the needed Ruby libraries.
- Set up a new Rails application configured to use the spatial database.
- Create an ActiveRecord model with a spatial attribute.
- Experiment with location data in the model.
- Perform simple spatial queries.
This should help you get started writing basic location features in Rails, giving you a feel for what the tools are and how they fit together.
This is part 2 of my series of articles on geospatial programming in Ruby and Rails. For a list of the other installments, please visit http://www.daniel-azuma.com/blog/archives/category/tech/georails.