Closed shefalee1 closed 9 years ago
I got the same issue. It was working before now it fails.
Also reported here http://stackoverflow.com/questions/27519219/geocoder-not-working-properly-with-rails-4
I am also experiencing the same issue and first found that my ip addresses were not being GC after entered into the database.
This is not a problem with Geocoder, it's an issue with the freegeoip service. Please try a different IP address geocoding service, eg:
Geocoder.configure(ip_lookup: :telize)
If you need higher availability service you'll need to pay for host a database locally.
FATAL -- :
ActionView::Template::Error (Please specify a valid lookup for Geocoder (:telize is not one of: :dstk, :esri, :google, :google_premier, :yahoo, :bing, :geocoder_ca, :geocoder_us, :yandex, :nominatim, :mapquest, :ovi, :baidu, :test, :freegeoip, :maxmind).):
:ip_lookup
, not :lookup
Yep got that working, but the result is not accurate, Google is giving me correct city but telize is not.
Is it possible that with Telize as Ip Lookup, request.location is not working?
@ahmadhasankhan , I got the same problem. I'm using telize and its not giving me the right location? Do I need to use a different ip_lookup? Google is accurate but once in a month google update their service (I believe) and the day they are updating, the service is unavailable for that day. Could you recommend me a better solution? Thanks in advance!
I am having same problem.
:004 > Geocoder.configure(ip_lookup: :telize)
=> {:timeout=>20, :lookup=>:yandex, :ip_lookup=>:telize, :language=>:en, :http_headers=>{}, :use_https=>false, :http_proxy=>nil, :https_proxy=>nil, :api_key=>nil, :cache=>nil, :cache_prefix=>"geocoder:", :always_raise=>[], :units=>:km, :distances=>:linear}
:005 > Geocoder.search("hyderabad")
Geocoding API's response was not valid JSON.
=> []
:006 >
:007 > g =Geocoder.search("137.118.141.50")
Geocoding API's response was not valid JSON.
=> []
@aashish please see #950. You'll need to install from master
until new gem is released (which will be very soon).
request.location given nil often and getting timeout error still after adding geocoder configuration timeout to 20. And one more thing , Geocoder.search("23.3.4.5") when trying this , getting error Geocoding API's response was not valid JSON. => [ ]