Post by Peter Cooper on June 2nd, 2006
Load 171021 countries, states, and towns into your app’s database

- Get DOM-friendly IDs from your Rails objects
- 10 cool Rails plugins by Coda Hale
- Asset Management with Ruby DSLs


Devin Steffler shows you how to load over 100000 countries, states, and towns into your Rails app's database, from how to get the data to the code to transform the data into database entries.

Click here to add on del.icio.us
Tweet This









June 8th, 2006 at 2:02 am
I posted the file in a comment on a comment in the article so that you can simply download a zip file containing all of the SQL insert scripts so that you don't need to build a script generator to parse the text file containing all of the cities/states/countries.
June 8th, 2006 at 2:07 am
Great work, Devin!