2011-02-09 174 views
0

嗨,我是用曲别针和plupload想在这个教程: http://www.theroamingcoder.com/node/50轨+回形针+ plupload

它的工作原理。 但是,如果我打算用回形针设置缩略图:

has_attached_file :data, 
    :styles => { :medium => "558x418>", :thumb => "60x82>" } 

它不工作。 我收到此错误:

[paperclip] identify -format %wx%h '/tmp/stream20110209-26212-1l2obtp-0.png[0]' 2>/dev/null 
[paperclip] convert '/tmp/stream20110209-26212-1l2obtp-0.png[0]' -resize "558x418>" '/tmp/stream20110209-26212-1l2obtp-020110209-26212-cl5lbg-0' 2>/dev/null 
[paperclip] An error was received while processing: #<Paperclip::PaperclipError: There was an error processing the thumbnail for stream20110209-26212-1l2obtp-0> 
[paperclip] identify -format %wx%h '/tmp/stream20110209-26212-1l2obtp-0.png[0]' 2>/dev/null 
[paperclip] convert '/tmp/stream20110209-26212-1l2obtp-0.png[0]' -resize "60x82>" '/tmp/stream20110209-26212-1l2obtp-020110209-26212-1m6qvkj-0' 2>/dev/null 
[paperclip] An error was received while processing: #<Paperclip::PaperclipError: There was an error processing the thumbnail for stream20110209-26212-1l2obtp-0 

我该怎么解决呢?

谢谢

回答

1

我在plupload

2

它看起来像你没有安装Imagemagick!

http://www.imagemagick.org/script/index.php

如果我错了,试试这个

has_attached_file :data, :styles => { :medium => ["558x418>", :png], :thumb => ["60x82>", :png] } 
+0

禁用块不起作用 – 2011-02-09 13:18:46