加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 使用回形针在heroku中播种图像

发布时间:2020-12-17 02:20:25 所属栏目:百科 来源:网络整理
导读:当我运行heroku运行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]" -
当我运行heroku运行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和有效的db记录,但是在公共文件夹中没有重新创建图像..如果我通过视图形式添加图像一切都很好.

我的种子

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'

解决方法

找到解决方案

thx this

和this

和this

gem ‘aws-sdk’

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读