I have already search out on the stack overflow but didn't find any answered related to it.
With the following below line we can get the ip address of request.
request.remote_ip
it's working fine for the ip address and gives me correct ip address of the remote machine.
But for the location it doesn't gives me the correct location.
request.location
With the above line the data which i get is like below
#<Geocoder::Result::Freegeoip:0xb47eae8c @data={"ip"=>"192.168.1.183", "country_code"=>"RD", "country_name"=>"Reserved", "region_code"=>"", "region_name"=>"", "city"=>"", "zipcode"=>"", "latitude"=>0, "longitude"=>0, "metro_code"=>"", "areacode"=>""}, @cache_hit=nil>
But the ip address is currently in india and it gives me the country name "Reserved"
Any one help will defiantly appreciate