4
當我運行heroku run rake db:seed
我得到種子圖像與回形針
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.
我得到了我的東西,並有效的數據庫記錄,但圖像沒有公共文件夾中重新創建。如果我通過查看錶單中添加圖像全部是好。
我的種子
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'