0
왜 ImageMagick에서 내 Paperclip 업로드를 열 수 있습니까?Paperclip 및 RMagick :이 이미지 형식의 디코딩 대리자가 없습니다.
몇 가지 검사를 수행 할 수 있어야합니다.
class Photo < ActiveRecord::Base
ATTACHMENT_STYLES = lambda do |attachment|
if is_something?(attachment.instance)
...
else
...
end
end
ATTACHMENT_PROCESSORS = lambda { |attachment| is_something?(attachment.instance) ? [:other_processor] : [:thumbnail] }
...
def self.is_something?(attachment)
file = Magick::ImageList.new(attachment)
...
end
end
하지만 왜 내가 이것을 얻고 있습니까?
Magick::ImageMagickError in TopicsController#create
no decode delegate for this image format `0x00000004e3cc50>' @ error/constitute.c/ReadImage/544
Extracted source (around line #20):
file = Magick::ImageList.new(attachment)
app/models/photo.rb:20:in `new'
app/models/photo.rb:20:in `is_something?'
app/models/photo.rb:3:in `block in <class:Photo>'
감사합니다. 그러나 문제는 여전히 불행히도 지속됩니다. –