if Rails.env.development?
@current_location_geo = Geocoder.search(request.remote_ip).first
else
@current_location_geo = request.location
end
if !@current_location_geo.nil? && @current_location_geo.ip == "127.0.0.1"
@departure_currency_code= "AUD"
@departure_currency_name= ["Australian Dollar(AUD $)","AUD"]
else
@country = Country.new(request.location.data["country_code"].to_s)
@country_code = @country.currency.code
end
end
i am getting request.location nil. i tried to add timeout in configuration but it not helped for me.
error in production mode as "Geocoding API's response was not valid JSON."
and when i traced it i got request.location as nil.
my geocoder version is (1.2.6).