简体   繁体   English

mod_rails和Paperclip问题Paperclip :: NotIdentifiedByImageMagickError

[英]mod_rails and Paperclip problem Paperclip::NotIdentifiedByImageMagickError

I am havingn troble deploying my app to a server runing ubuntu with mod_rails. 我没有将我的应用程序部署到运行带有mod_rails的ubuntu的服务器上。 Runing webrick on the server seems fine and I can save files, no problem. 在服务器上运行webrick看起来很好,我可以保存文件,没问题。 But runing the app thru nginx, I get this error when I try to save a file. 但是通过nginx运行应用程序,当我尝试保存文件时出现此错误。

[paperclip] An error was received while processing: # [paperclip] An error was received while processing: # R [paperclip]处理时收到错误:#[paperclip]处理时收到错误:#R

Paperclip.options[:image_magick_path]

Is deprecated, apparently. 显然是被弃用了。 Try: 尝试:

Paperclip.options[:command_path] = "/usr/local/bin"

Which worked for me. 这对我有用。 Adjust path to ImageMagick as needed. 根据需要调整ImageMagick的路径。

The path to ImageMagick is getting lost, try adding ImageMagick的路径迷路了,尝试添加

Paperclip.options[:image_magick_path] = '/opt/local/bin'

to your config. 到你的配置。

If adding 如果加入

Paperclip.options[:command_path] = "/usr/local/bin/"

doesn't work try installing ImageMagick with common delegates: 不起作用尝试使用常见ImageMagick安装ImageMagick

mkdir /sources cd /sources

wget
ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz

tar xvfz ImageMagick.tar.gz

cd ImageMagick-6.6.7-8

Here comes the part makes the difference 这部分有所不同

./configure --disable-static
--with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8

make

sudo make install

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM