Introducing the Glw gem

require 'glw'

glw = Glw.new
r3 = glw.locate 55.91918833, -3.17699833

The Glw gem uses Google’s geolocation API service via the the Geocoder gem.

Output:

{
  :address=>"16 Blackford Glen Rd, Edinburgh EH16, UK", 
  :city=>"Edinburgh", :coordinates=>[55.9191027, -3.1769954], 
  :country=>"United Kingdom", :postal_code=>"EH16", 
  :route=>"Blackford Glen Road", :street_number=>"16", 
  :types=>["street_address"], :relative_distance=>0.01, :relative_bearing=>359
}

Resources