In my production server I\'ve used the Geocoder gem. But, the following code not working in the server console.
Geocoder.search(\"192.168.1.4\")
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.