title: Get In That DB! Parsing CSV Using Ruby
body: <p>I have a CSV file formatted just like this:</p>
  
  <pre><code>name,color,tasty,qty
  apple,red,true,3
  orange,orange,false,4
  pear,greenish-yellowish,true,1
  </code></pre>
  
  <p>As you can see, each column in the Ruby OO world represents a mix of types -- string, string, boolean, int.</p>
  
  <p>Now, ultimately, I want to parse each line in the file, determine the appropriate type, and insert that row into a database via a Rails migration.  For ex:</p>
  
  <pre><code>Fruit.create(:name =&gt; 'apple', :color =&gt; 'red', :tasty =&gt; true, :qty =&gt; 3)
  </code></pre>
  
  <p>Help!</p>