2012-10-06 78 views
0

我試圖讓回形針gem在我的生產服務器上上傳圖像(ubuntu 12.0.4,apache2,phusion passenger和rvm)和每個附件我得到三批此驗證錯誤的:paperclip gem驗證錯誤 - 'filename'無法被'identify'命令識別

Img one /tmp/villa-0520121006-4333-hdo9wv.jpeg is not recognized by the 'identify' command.

ImageMagick的安裝是否正確,因爲是libmagickwand-dev軟件包,Rmagick和回形針。 而且我已經將正確的command_path設置到了我的production.rb配置文件中的標識和轉換位置。

這裏是我的模型,如果有幫助:

class Property < ActiveRecord::Base 
    attr_accessible :img_one, :img_two, :img_three, :img_four, :img_five, :img_six, :price, :title, :description, :location, :beds, :property_type, :agreement_type, :featured 
    has_attached_file :img_one, :styles => { :medium => "420x280>", :mobile => "300x220", :thumb => "100x80>" } 
    has_attached_file :img_two, :styles => { :medium => "420x280>", :mobile => "300x220", :thumb => "100x80>" } 
    has_attached_file :img_three, :styles => { :medium => "420x280>", :mobile => "300x220", :thumb => "100x80>" } 
    has_attached_file :img_four, :styles => { :medium => "420x280>", :mobile => "300x220", :thumb => "100x80>" } 
    has_attached_file :img_five, :styles => { :medium => "420x280>", :mobile => "300x220", :thumb => "100x80>" } 
    has_attached_file :img_six, :styles => { :medium => "420x280>", :mobile => "300x220", :thumb => "100x80>" } 


    validates_presence_of :title, :description, :location, :beds, :property_type, :agreement_type, :price 
    validates :price, :numericality => { :greater_than => 0 } 
    validates :beds, :numericality => { :only_integer => true, :greater_than => 0 } 
end 

我真的抓我的頭這一個和任何幫助或建議,將不勝感激 感謝

回答

相關問題