Heroku未能播种照片。我正在使用paperclip和imagemagick

时间:2015-04-03 04:27:43

标签: ruby-on-rails heroku

这是我的照片模型:

class Photo < ActiveRecord::Base
  belongs_to :category
  belongs_to :user
  belongs_to :trip_info

  has_attached_file :avatar,
                    :styles => { :medium => "310x300#>",
                                 :thumb => "100x100#>",
                                 :city => "260x250#",
                                 :large => "500x300#"
                                },
                    :default_url => "/images/:style/logo3.png"

  validates_attachment_content_type :avatar, :content_type => /\Aimage\/.*\Z/
end

在我的production.rb和development.rb文件中:

Paperclip.options[:command_path] = "/usr/local/bin/"

当我在终端输入转换时,我看到:

/usr/local/bin/convert

当我尝试推送到heroku时,我收到此错误消息:

ActiveRecord::RecordInvalid: Validation failed: Avatar There was an error processing the thumbnail for 2226e4749f8e482e24c4c2d9902e3b5120150403-3-1taxt3u, Avatar There was an error processing the thumbnail for 2226e4749f8e482e24c4c2d9902e3b5120150403-3-1taxt3u

Aragh Heroku ...我该如何推动和培养我的数据库?当我尝试运行heroku run rake db:seed。

时会发生这些错误

0 个答案:

没有答案