How to import data to the database from a CSV file? <p>I am using Ruby 1.9.2, the Ruby on Rails v3.2.2 gem and the MySQL database. I would like to import data to the database from a <a href="http://www.maxmind.com/download/worldcities/worldcitiespop.txt.gz" rel="nofollow">CSV file</a> containing world cities. I think this process should be made by running a RoR migration but I don't know how to properly proceed.</p> <p>In particular, I don't know <em>where</em> (that is, in which directory relating my RoR application) I should put the CSV file and <em>how to access</em> that file from my migration file in order to add data to the database.</p>