Seed images in heroku with paperclip
heroku, paperclip, ruby, ruby-on-rails, seed
Solution
Found solution.
Thanks to this answer, this article and this other article.
gem 'aws-sdk'
Problem
When I run `heroku run rake db:seed` I get ``` Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/image20130219-2-1gk1yip.png[0]' Command :: composite -gravity Center /app/public/media/watermark.png "/tmp/image20130219-2-1gk1yip.png[0]" -resize "1x1<" "/tmp/image20130219-2-1gk1yip.png20130219-2-1ng5f6c[0]" Command :: file -b --mime '/tmp/image20130219-2-1gk1yip.png20130219-2-1ng5f6c' Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/image20130219-2-1gk1yip20130219-2-t3caqg.png20130219-2-1ng5f6c[0]' Command :: convert "/tmp/image20130219-2-1gk1yip20130219-2-t3caqg.png20130219-2-1ng5f6c[0]" -resize "260x190" "/tmp/image20130219-2-1gk1yip20130219-2-t3caqg.png20130219-2-1mz0u16[0]" Command :: file -b --mime '/tmp/image20130219-2-1gk1yip20130219-2-t3caqg.png20130219-2-1mz0u16' [paperclip] Saving attachments. ``` I got my Stuff and valid db record, but image is not recreated in public folder.. If I add image through view form all is good. My seed ``` Stuff.create! title: 'title', description: 'desc', :img => File.open(File.join(Rails.root, '/db/seeds/image.png')) ``` Gemfile ``` gem 'json' gem 'haml-rails' gem 'sass-rails' gem 'coffee-rails' gem 'rails_autolink' gem 'formtastic' gem 'paperclip' gem 'rmagick', '2.12.0' gem 'pg' gem 'uglifier' ```