Ich benutze Schienen 3 und Büroklammer. Meine Logik erlaubt dem Benutzer, ein Bild hochzuladen. Dies funktioniert einwandfrei, es sei denn, der Benutzer wählt eine Datei aus, die kein Bild ist.Büroklammer - Fehler beim Hochladen des Bildes: "wird vom Befehl 'identifizieren' nicht erkannt."
Wenn der Benutzer eine Textdatei, nimmt zum Beispiel der Validierung Pässen sondern endet mit diesem Fehler up:
5 errors prohibited the profile update:
Profile pic content type is not one of image/jpeg, image/png, image/gif
Profile pic /var/folders/lF/lF0Ne5vGFj44kV54W3zBdU+++TI/-Tmp-/stream20101118-229-17xuiu4-0.js is not recognized by the 'identify' command.
Profile pic /var/folders/lF/lF0Ne5vGFj44kV54W3zBdU+++TI/-Tmp-/stream20101118-229-17xuiu4-0.js is not recognized by the 'identify' command.
Profile pic /var/folders/lF/lF0Ne5vGFj44kV54W3zBdU+++TI/-Tmp-/stream20101118-229-17xuiu4-0.js is not recognized by the 'identify' command.
Profile pic /var/folders/lF/lF0Ne5vGFj44kV54W3zBdU+++TI/-Tmp-/stream20101118-229-17xuiu4-0.js is not recognized by the 'identify' command.
Zumindest der erste Fehler bezieht sich auf den Dateityp. Aber wenn die Börse etwas speziellere Datei, wie ein .PXM
, dann verhält sich Rails seltsam und zeigt dies:
4 errors prohibited the profile update:
Profile pic /var/folders/lF/lF0Ne5vGFj44kV54W3zBdU+++TI/-Tmp-/stream20101118-229-1scwkg7-0.pxm is not recognized by the 'identify' command.
Profile pic /var/folders/lF/lF0Ne5vGFj44kV54W3zBdU+++TI/-Tmp-/stream20101118-229-1scwkg7-0.pxm is not recognized by the 'identify' command.
Profile pic /var/folders/lF/lF0Ne5vGFj44kV54W3zBdU+++TI/-Tmp-/stream20101118-229-1scwkg7-0.pxm is not recognized by the 'identify' command.
Profile pic /var/folders/lF/lF0Ne5vGFj44kV54W3zBdU+++TI/-Tmp-/stream20101118-229-1scwkg7-0.pxm is not recognized by the 'identify' command.
Weiß jemand, was hier vor sich geht? Ich habe den folgenden Code in meinem Modell:
validates_attachment_content_type :profile_pic, :content_type=>['image/jpeg', 'image/png', 'image/gif']
... und das Büroklammer initializer:
Paperclip.options[:command_path] = "/opt/local/bin/"
ImageMagik erscheint korrekt installiert und eingerichtet werden:
$ which Magick-config
/opt/local/bin/Magick-config
Dank!
Was bedeutet 'was identifizieren',' suchen identifizieren' oder 'finden/-name identifizieren' zurück? – Eric
$ identifizieren /opt/local/bin/identifizieren – AnApprentice
Ich reparierte dies mit Kokain 0.3.2. Weitere Informationen finden Sie unter http://stackoverflow.com/questions/12753157/paperclipnottiedibyimagemagickerror-in-spreeadminimagescontrollercre/12771707#12771707 –