照片无法运行
identify
命令。请安装 ImageMagick的。
Paperclip一直在开发中工作正常但突然间我无法上传照片.. 没有安装imagemagic,但它工作得更早。有没有人有线索?
这是我的控制台错误:
Setting Load (0.1ms) SELECT "settings".* FROM "settings" WHERE "settings"."id" = ? LIMIT 1 [["id", "14"]]
(0.1ms) begin transaction
Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/ubuntu_wallpaper_by_hyarmenadan-d54zgpm20130926-11024-9efnnx.jpg[0]'
[paperclip] An error was received while processing: #<Paperclip::Errors::CommandNotFoundError: Could not run the `identify` command. Please install ImageMagick.>
Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/ubuntu_wallpaper_by_hyarmenadan-d54zgpm20130926-11024-9efnnx.jpg[0]'
[paperclip] An error was received while processing: #<Paperclip::Errors::CommandNotFoundError: Could not run the `identify` command. Please install ImageMagick.>
Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/ubuntu_wallpaper_by_hyarmenadan-d54zgpm20130926-11024-9efnnx.jpg[0]'
[paperclip] An error was received while processing: #<Paperclip::Errors::CommandNotFoundError: Could not run the `identify` command. Please install ImageMagick.>
答案 0 :(得分:6)
Paperclip使用ImageMagick,因此您之前可以使用回形针。
ImageMagick是许多软件的依赖项,因此它可能是由其他软件包安装的,然后在使用apt-get autoremove
之类的内容时被删除。
无论如何,您必须为回形针安装ImageMagick才能使用其identify
和convert
二进制文件:
apt-get install imagemagick
identify
二进制文件用于检索图像的大小(即:您的原始图像,存储其大小并可能验证它)。
convert
二进制文件用于更改图像,例如调整图像大小或更改格式(jpg,png等)......在许多可能的转换中。有关详细信息,请参见其手册页。