Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request.location nil and timeout error #770

Closed
shefalee1 opened this issue Dec 18, 2014 · 10 comments
Closed

request.location nil and timeout error #770

shefalee1 opened this issue Dec 18, 2014 · 10 comments

Comments

@shefalee1
Copy link

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.
=> [ ]

@shefalee1 shefalee1 reopened this Dec 18, 2014
@webgem-jpl
Copy link

I got the same issue. It was working before now it fails.

@chesterl
Copy link

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.

@alexreisner
Copy link
Owner

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.

@ahmadhasankhan
Copy link

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).):

@alexreisner
Copy link
Owner

:ip_lookup, not :lookup

@ahmadhasankhan
Copy link

Yep got that working, but the result is not accurate, Google is giving me correct city but telize is not.

@glacerenza
Copy link

Is it possible that with Telize as Ip Lookup, request.location is not working?

@ImtiazEmu
Copy link

@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!

@aashish
Copy link

aashish commented Dec 15, 2015

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.
 => [] 

@alexreisner
Copy link
Owner

@aashish please see #950. You'll need to install from master until new gem is released (which will be very soon).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants