Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best Zip Code Plugin for Ruby [closed]

Tags:

ruby

api

zipcode

I need to find the city and state from a zip code. Does anyone know a good plugin/API that I can use to do this?

like image 897
Splashlin Avatar asked Oct 14 '10 15:10

Splashlin


1 Answers

gem install geokit

In IRB:

require 'geokit'
geo = GeoKit::Geocoders::MultiGeocoder.multi_geocoder('90210')
if geo.success
  geo.state # => CA
  geo.city  # => Beverly Hills
end
like image 98
Jason Noble Avatar answered Nov 02 '22 17:11

Jason Noble