NotIdentifiedByImageMagickError有以下型号:回形针::错误::在轨道4,5
class Picture < ActiveRecord::Base
belongs_to :business
has_attached_file :image, styles: { medium: "640x260>" }
validates_attachment :image, content_type: { :content_type => /\Aimage\/.*\Z/ }
end
而且我已经安装了 'ImageMagick的' 使用BREW(我使用的是Mac OS)。但是,当我试图执行以下代码
@picture = business.pictures.build(picture_params)
@picture.save
def picture_params
params.require(:picture).permit(:image)
end
我得到了以下错误:An error was received while processing: #<Paperclip::Errors::NotIdentifiedByImageMagickError: Paperclip::Errors::NotIdentifiedByImageMagickError>
我试图更新PNG文件:
= form_for [:admin, business, @picture] do |f|
.row
= f.file_field :image
= f.submit 'Add'
我怎样才能解决我的问题?
对于Windows用户有什么建议? – 2015-05-26 14:57:02