I have been running into this issue while trying to call Google Maps Api in my demo environment. The api works fine on my production which is odd because they are exactly the same right now
I have set the timeout limit but am still getting the same issue. I have also tried changing from freegeoip to a different ip_lookup and that did not work either. Please let me know if there is any information I can provide to help debug this problem. Thanks
config/initializers/geocoder.rb
Geocoder.configure(
# geocoding options
timeout: 15, # geocoding service timeout (secs)
lookup: :google, # name of geocoding service (symbol)
# :language => :en, # ISO-639 language code
# :use_https => false, # use HTTPS for lookup requests? (if supported)
# :http_proxy => nil,
# :https_proxy => nil,
api_key: APIKEY,
cache: Rails.cache, # cache object (must respond to #[], #[]=, and #keys)
cache_prefix: 'geocoder:', # prefix (string) to use for all cache keys
ip_lookup: :freegeoip,
# exceptions that should not be rescued by default
# (if you want to implement custom error handling);
# supports SocketError and TimeoutError
# :always_raise => [],
# calculation options
units: :km # :km for kilometers or :mi for miles
# :distances => :linear # :spherical or :linear
)