简体   繁体   English

应用样式时回形针失败 - ImageMagick 已安装 - Win 7 - Rails -

[英]Paperclip fails when styles are applied - ImageMagick installed - Win 7 - Rails -

I've got paperclip working so that I can upload and edit a photo but when I try to apply styles to it it falls over.我有回形针工作,这样我就可以上传和编辑照片,但是当我尝试对其应用样式时,它倒下了。

 Invalid argument - convert

ImageMagick is installed but I'm not sure if it's installed properly - when I tested the install with the convert logo: logo.gif it creates the logo but I have to open it from explorer - it won't let me from the command line - as per instructions. ImageMagick 已安装,但我不确定它是否安装正确 - 当我使用convert logo: logo.gif测试安装时convert logo: logo.gif它创建徽标但我必须从资源管理器打开它 - 它不会让我从命令行- 按照说明。 (I'm not sure if this is an issue?) (我不确定这是否是一个问题?)

  # Paperclip
    has_attached_file :photo, :styles => { :thumb => "150x115>" }

If I rename the the ImageMagick folder I get a different error undefined method "exitstatus" which suggests to me that paperclip is talking to it but there's another issue?如果我重命名 ImageMagick 文件夹,我会收到一个不同的错误undefined method "exitstatus" ,这表明回形针正在与它交谈,但还有另一个问题?


Got it!!知道了!!

Not sure what was going on but a system reboot sorted it.不确定发生了什么,但系统重新启动对其进行了排序。 I suspect it had something to do with ImageMagick setting it's root path.我怀疑它与 ImageMagick 设置它的根路径有关。 I had re-installed it several times trying to get it to work.我已经多次重新安装它试图让它工作。

I don't have Windows 7, but can definitely confirm that it has to do with the installation of ImageMagick, and nothing to do with how you've used the paperclip gem.我没有 Windows 7,但可以肯定地确认它与 ImageMagick 的安装有关,与您如何使用回形针 gem 无关。

Once ImageMagick is installed correctly, you should be able to run the convert command from Cygwin.正确安装 ImageMagick 后,您应该能够从 Cygwin 运行convert命令。

Did you run the installer from here ?你是从这里运行安装程序的吗?

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

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