Search code examples
ruby-on-railsrubyrails-geocoder

Ruby Geocoder is throwing error


I am working on RoR and using Ruby Geocoder for IP identification. The code snippet I use giving below.

Gemfile

gem "geocoder"

Then for fetching country I am using

country = request.location.country

It was working perfectly before,but now it is throwing an error like undefined method country for nil class.

I am not able to figure out the issue. Can any one help me to find out the solution or suggest any other gem on API for finding country based on IP Address

Thanks
Regards


Solution

  • There seems to have been an issue with Geocoder service. Even my application that runs on AWS was giving same problem for last 36'ish hours. Its all working well now. I didn't do anything, that makes me imply there was something wrong with Geocoder which they have apparently fixed now.

    I wonder if this has happened in the past as it certainly worries me.