2011-01-12 2 views
0

이것은 간단한 작업이지만 벽에 부딪 치고이 응답을 디버깅하는 방법을 모르겠습니다. 내 이미지 모델에서오류를 일으키는 Paperclip (RoR의 이미지 파일)을 업로드하는 중

, 내가 가진 :

내보기에 그런
class Image < ActiveRecord::Base 
    has_attached_file :image, :styles => { :display => "500x500>", 
              :thumbnail => "95x95>"} 

, 내 양식이 포함되어 내 MySQL의 테이블에서

-form_for @image, :html => { :multipart => true } do |image| 
    %tr 
     %td.woc_left 
     =label_tag :image, 'photo to upload', :class => 'required' 
     %td.woc_center 
     =image.file_field :image 

, 나는 열라고했다 "image_file_name"(끈). 내가 이미지를 업로드하여 제출하려고 할 때

그러나, 나는 내가 뭘 잘못

2 errors prohibited this from being saved 
There were problems with the following fields: 
Image Paperclip::CommandNotFoundError 
Image Paperclip::CommandNotFoundError 

를 참조? 도와 줘서 고마워!

+0

ImaceMagik이 올바르게 설정되지 않으면 클립이 작동하지 않습니다. 콘솔에서 'identify image.jpeg'를 실행할 수 있습니까? 그렇지 않은 경우 ImageMagik이 문제입니다. – Draiken

답변

0

클립은 외부 도구를 사용하여 이미지의 크기를 조정합니다. 도구가 설치되어 있지 않거나 찾을 수없는 것 같습니다.

저는 ImageMagick을 사용했지만 다른 도구는 Paperclip에서 사용할 수 있습니다.

실행중인 환경은 어느 것입니까?

관련 문제