title: Seeding file uploads with CarrierWave, Rails 3
body: <p>I'm trying to seed a database in Rails 3 with images using CarrierWave, however nothing I try seems to work short of having to upload them all by hand.</p>
  
  <pre><code>pi = ProductImage.new(:product =&gt; product)
  pi.image = File.open(File.join(Rails.root, 'test.jpg'))
  pi.store_image! # tried with and without this
  product.product_images &lt;&lt; pi
  product.save!
  </code></pre>
  
  <p>Anybody know how to seed using CarrierWave at all?</p>