codeforamerica / MuniciPal

:speech_balloon: Consulting city-dwellers about legislation near them.
22 stars 14 forks source link

use specific commit for geoservices gem; otherwise getting errors #165

Closed techieshark closed 7 years ago

techieshark commented 7 years ago

Unfortunately the 0.0.9 version of the geoservices gem results in some errors (below) after you load the initial page and then move the map pin to somewhere on the map.

Started GET "/?lat=33.41396194657839&lng=-111.81472778320312" for 127.0.0.1 at 2017-04-15 22:12:32 -0700
Started GET "/?lat=33.41396194657839&lng=-111.81472778320312" for 127.0.0.1 at 2017-04-15 22:12:32 -0700
Processing by AddressesController#index as JSON
Processing by AddressesController#index as JSON
  Parameters: {"lat"=>"33.41396194657839", "lng"=>"-111.81472778320312"}
  Parameters: {"lat"=>"33.41396194657839", "lng"=>"-111.81472778320312"}
Completed 500 Internal Server Error in 295ms
Completed 500 Internal Server Error in 295ms

NoMethodError (undefined method `status' for #<Net::HTTPBadRequest 400 Bad Request readbody=true>):
  app/models/council_district.rb:17:in `getDistrict'
  app/controllers/addresses_controller.rb:45:in `index'

NoMethodError (undefined method `status' for #<Net::HTTPBadRequest 400 Bad Request readbody=true>):
  app/models/council_district.rb:17:in `getDistrict'
  app/controllers/addresses_controller.rb:45:in `index'

We can avoid by using the most recent prior version (commit e996bb7dcbe75ad202cf964ba57ee95d54beeaab).