alexreisner/geocoder — Issue #174: Freegeoip lookup not working over https
Author: estebanutz
Created: 2012-02-09 00:59:21+00:00
State: open

I've tried my best to solve this issue but I can't find a solution. I'm not sure if it's a problem with the gem or the Freegeoip at all. So I'm hoping you guys have some tips or idea on what could be wrong.

Locally the lookup works fine ( Geocoder.search("xx.xxx.xxx.xxx") ) , even though I noticed that freegeoip.net is kind of unreliable, but for the most part it works.

Now on production, which is running on heroku over https, it just doesn't work I tried it with the default settings, adding the "Geocoder::Configuration.use_https = true" and all that and when I do a lookup it doesn't return anything. A couple of things to keep in mind, when I run "Geocoder.search("xx.xxx.xxx.xxx")" on heroku console with use_https set to false, it works, but it doesn't work in the application, even though I'm running the same function. The other thing to keep in mind is that even though I'm on https I can still get the correct ip.

Thanks!