开发者

How to verify if paperclip is working correctly with ImageMagick?

I installed ImageMagick and the paperclip gem on my Windows machine. The thing is that :styles => {...} is not working, so I assumed that paperclip is having some problem with ImageMagick.

I tested whether ImageMagick has been properly installed by running the echo %path% command and the installation seems to be alright.

I also included the following in the development.rb file:

Paperclip.options[:command_path] = "C:\Program Files\ImageMagick-6.6.8-Q16"

In show.html.erb, the thumbnails are not displayed.

<%= image_tag @user.avatar.url(:small) %>
<%= image_tag @user.avatar.url(:thumb) %>

How will I know that paperclip is not working w开发者_JS百科ith ImageMagick on Windows?


Try converting an image with Imagemagick right from the command line: http://www.imagemagick.org/script/convert.php?ImageMagick=j0e25rle0cl99l8lade2e6l8n3

if it doesn't work then it's your Imagemagick installation which is not working.

Also check if the image was created properly by rails, that should be in public/system/avatar/ folder inside you rails application folder, unless you changed the default configuration...


Have you put form_for(...,:html => { :multipart => true })? One day this helped me


I might be late here to give answer but this really help me to check if my imagemagick is working or not on which rmagick is depend. Just try to convert one of your image with

convert rose.jpg -resize 50% rose.png

This is just the basic operation for image magick. If it works for you then your imagemagick is working well

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜