getmovement / deprecated-movement-rails-api

DEPRECATED Rails API for getmovement.org
1 stars 1 forks source link

Add congressional districts #52

Closed joshsmith closed 6 years ago

joshsmith commented 8 years ago

This will close #51 and parts of #8.

joshsmith commented 8 years ago

I'm still expecting to add a bit of documentation here and there.

One question I have concerns CongressionalDistrict.for_location: do we want to be able to return a single result, and if so, where? Right now this would return two districts if the point is along the boundary of those two districts.

begedin commented 8 years ago

Just some info on how I had to setup my environment to get specs to pass

I believe the first two steps should be enough. My issue was that I ran the bundle before the brew command, so rgeo wasn't built with GEOS support included.

joshsmith commented 8 years ago

@begedin I also had to do the same due to GEOS. I wonder if there's something special we need to do on Heroku, too.

begedin commented 8 years ago

My guess is, this order should work:

brew install geos
brew install proj
brew install postgis
bundle install

There should also be no redundance with that one.

The important part is, geos and proj need to be installed before the rgeo gem is installed (as part of bundle install). That way, the gem will be built properly.