开发者

I've installed ImageMagick, added the proper line to development.rb, but Paperclip still won't let me upload photos

Using Windows 7. I've installed ImageMagick in C:\Program Files\, and I've tried adding the line

Paperclip.options[:command_path] = "C:\Program Files"

as well as

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

to config/environment/development.rb. I still get the following error when trying to upload an image:

/Local/Temp/stream20110212-5000-s69b6a.png is n开发者_运维百科ot recognized by the 'identify' command.

Any ideas?


I had the same issue with a rails app using paperclip. In my case I'm on a Mac, but the error was:

/var/folders/es/es6TeBjk2RasAk+1YvsY6++++TI/-Tmp-/stream20110214-45420-usux9f-0.png is not recognized by the 'identify' command.

It seems to occur if ImageMagick (IM) is not compiled with PNG support. The windows binaries should come with PNG as one of the default delegates in the installation files.

Try reinstalling the latest version if IM. The alternate option is to recompile ImageMagick with the PNG library available. This is how I fixed this issue on my Mac.

For windows, recompilation is not so simple. ImageMagick offer a download of the libpng library from their delegates folder. They also supply instructions on an Advanced windows install using delegates. It requires the MS Visual Studio IDE to compile.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜