geocoding api not responding fast enough for IP address

给你一囗甜甜゛ 提交于 2019-11-29 17:21:17

I think it is an issue with freegeoip, try the following:

Enter this in your rails console:

Geocoder.configure(:ip_lookup => :telize)

Now try you search in your console.

if this works you can have your file (config/initializers/geocoder.rb)

Geocoder.configure(

  :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:",

  :units=>:km,

  :distances=>:linear

)

I hope this help you.

Have you tried using your Public facing IP instead of the internal IP you are using?

IP address geocoding often returns results for the organization which owns the IP address block instead of the actual computer IP address. This is because IP address geocoding does not consider private IPs, VPNs, or internal network blocks.

I get this error when i am not connected to the internet..pls verify that you have an active internet or you are bypassing the proxy.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!