完全被“'识别'命令无法识别"所困扰Windows 开发盒上的导轨/回形针错误 [英] Completely stumped by "is not recognized by the 'identify' command" error in rails/paperclip on windows dev box
问题描述
我尝试过的任何事情似乎都不会对这个错误产生任何影响.该代码适用于 Mac Pro 开发机器以及我们的 Ubunto 9.10 服务器.开发工作使用的是 Mongrel 而不是Passenger.
Nothing I have tried seems to have any impact at all on this error. The code is working on both a Mac Pro dev maching as well as our Ubunto 9.10 server. Dev work is using Mongrel not Passenger.
我完全被难住了.愿意尝试任何事情.
I am fully and completely stumped. Willing to try anything.
我关注了这个:http://thewebfellas.com/blog/2008/11/2/goodbye-attachment_fu-hello-paperclip信.
我尝试安装 32 位和 64 位版本(在 XP 64 上).
I tried installing both 32 and 64 bit versions (on XP 64).
更新配置:
需要回形针"Paperclip.options[:command_path] = 'C:\ImageMagick\ImageMagick-6.6.3-Q16'Paperclip.options[:swallow_stderr] = false
require "paperclip" Paperclip.options[:command_path] = 'C:\ImageMagick\ImageMagick-6.6.3-Q16' Paperclip.options[:swallow_stderr] = false
系统是:XP 64 位服务包 2导轨 2.3.8回形针 2.3.3aws-s3 0.6.2
System is: XP 64 bit service pack 2 Rails 2.3.8 paperclip 2.3.3 aws-s3 0.6.2
推荐答案
paperclip.rb 文件中有一些愚蠢的东西.它在命令行参数周围添加单引号.如果我能记得,我相信它在第 133 行,该行看起来像这样:
There is some goofy stuff going on in the paperclip.rb file. It adds single quotes around command line arguments. If I can recall, I believe its on line 133 and the line looks like this:
...'#{m}'...
... '#{m}' ...
只需删除单引号.
如果这没有帮助,那么 ImageMagick 路径中也存在空格问题.它不喜欢 C:\Program Files...,所以我不得不把它改成 C:\Progra~1...
If that doesn't help there was also an issue with there being spaces in the ImageMagick path. It didn't like C:\Program Files..., so I had to change it to C:\Progra~1...
这似乎对我有用.这至少会使识别可执行文件运行.我目前在运行 convert 时遇到问题并且完全困惑.:)
That seemed to do the trick for me. That will at least get the identify executable running. I am currently having issues with running convert and am completely confused. :)
这篇关于完全被“'识别'命令无法识别"所困扰Windows 开发盒上的导轨/回形针错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!