A simple Geolocating Ruby Gem utilizing IP-API.com.
gem install simple_geolocator
Add this line to application's Gemfile:
gem('simple_geolocator')
And then execute:
$ bundle
Please see the Wiki for feature lists, documentation, and guides.
You can also view the RubyDocs but they are more limited.
You can also view the documentation in the code, which would probably be fastest for you anyway.