我用回形針插件在我的Rails應用程序如下:probem用回形針接受JPG和PNG生產
has_attached_file :photo, :styles => {:small => '64X64>', :medium => '250X250>'},
:url => "/assets/user_photos/:id/:style/:basename.:extension",
:path => ":rails_root/public/assets/user_photos/:id/:style/:basename.:extension"
# validates_attachment_presence :photo
validates_attachment_content_type :photo, :content_type => ['image/jpeg', 'image/png','image/gif']
validates_attachment_size :photo, :less_than => 1.megabytes
它適用於開發(Mac OSX版+雜種狗)的罰款。但是,當我把它在生產(Debian的Linux的+ APACHE /乘客),只接受.gif和我收到以下錯誤.png格式和.jpg:
Photo /tmp/stream20091028-20066-1t1a0oz-0 is not recognized by the 'identify' command.
Photo /tmp/stream20091028-20066-1t1a0oz-0 is not recognized by the 'identify' command.
我嘗試添加以下行的一些教程提示但它並沒有幫助!
Paperclip.options[:command_path] = "/usr/local/bin"
任何想法?
感謝,
擔
我還沒有看到這個確切的錯誤,但有*相似*問題時,imagemagick/rmagick沒有被正確編譯。從內存我不得不重新編譯,並確保他們編譯與Gzip/libjpeg/libtiff支持 – ADAM 2009-10-28 08:44:21