2013-03-11 2 views
5

클립에 문제가 있습니다. "#"크기 (자릿수 및 자르기) 다음에 422 오류가 발생합니다.종이 클립 422 오류

Command :: convert '/tmp/**** (20130110)20130311-13571-xxasmt.png[0]' -auto-orient -resize "150x150#" '/tmp/**** (20130110)20130311-13571-xxasmt20130311-13571-1anrx0y' 
[paperclip] An error was received while processing: #<Paperclip::Error: There was an error processing the thumbnail for **** (20130110)20130311-13571-xxasmt> 
Completed 422 Unprocessable Entity in 2785ms (Views: 0.8ms | ActiveRecord: 9.1ms) 

이 모델에서 내 클립 코드는 다음과 같습니다 :

has_attached_file :image, 
    :styles => { 
    :medium => "300x300#", 
    :thumb => "100x100>", 
    :standard => "150x150>" 
    }, 
    :storage => :s3, 
    :s3_credentials => "#{Rails.root}/config/s3.yml", 
    :bucket => "convertkit", 
    :s3_protocol => "https" 

나는 실종 뭔가 내 로그이 말한다?

+0

앱 서버의 표준 오류 로그를 확인하십시오. imagemagick의 변환 유틸리티의 일부 출력은 처리 할 수없는 이유를 나타냅니다. –

+0

stderr 로그는 어디에 있습니까? –

+0

웹 서버 및 OS에 따라 다릅니다. Redhat-ish OS에서 Apache의 경우, 예를 들어'/ var/log/httpd/error_log'가됩니다. –

답변

0
has_attached_file :avatar, 
       :styles => { 
          :thumb => "60x60>", :medium => "120x120>", 
          :original => "100%", small2: "65x65>", medium2: "144x144>" 
          }, 
          :storage => :s3, 
          :s3_credentials => "#{::Rails.root.to_s}/config/aws.yml", 
          :s3_permissions => "public-read", 
          :url => ':s3_alias_url', 
          :path => "/slider/:attachment/:id_partition/:style/:filename", 
          :s3_host_alias => Settings.cloud_front_url, 
          :s3_protocol => :https, 
          :s3_headers => {'Expires' => (Time.now + 6060243012).httpdate}, 
          default_url: "paperclip_default/slider/:style_missing.png" 
+0

괜찮습니다. – 120sturm

+0

답변의 형식을 수정하십시오! – jogo