I am using paperclip for storing files related to the model. The files can be in various formats depending on the description. I have specified following in the model:
require 'paperclip'
class Document < ActiveRecord::Base
belongs_to :candidate
attr_accessible :candidate_id, :description, :media
has_attached_file :media, :styles => { :profile => "100x100>" }
validates_attachment_presence :media
validates_attachment_size :media, :less_than => 3.megabytes
end
Before sometime it was working fine. Recently after I had some system upgrades of archlinux (may be Imagemagick was upgraded), I have following error while saving certain formats e.g. .doc .xls etc, it works for images though.
* Media /tmp/stream20111020-2130-zeux3k-0.doc is not recognized by the 'identify' command.
When I run identify command with the file I get following.
$ identify /tmp/stream20111020-2130-zeux3k-0.doc
identify: no decode delegate for this image format `/tmp/stream20111020-2130-zeux3k-0.doc' @ error/constitute.c/ReadImage/532
Should Paperclip try to resize the word document at all ?
Anything, I can do about this ?