Closed blanchma closed 3 years ago
Maybe you don´t need an answer anymore but for all other people with the same problem: You need configure your development environment config /config/environments/development.rb
Add this to the bottom of the file and restart your server - otherwise the plugin will use 127.0.0.1 which always returns nil
class ActionDispatch::Request
def remote_ip
"XX.XX.XX.XX" # fill in your IP address here
end
end
I am closing all issues that are more than 6 years old now, as the gem has had significant updates and is likely people with these old issues are no longer having the issues. If you are currently still experiencing this issue or need help feel free to submit a new issue, thank you.
I added in the top of the controller:
geocode_ip_address
And then:
logger.info "======= GEOLOCATION ===========" logger.info session[:geo_location]
It returns: nil in the logs