“识别”功能无法识别回形针我的图像命令。 (运行Windows)
我使用回形针调整图像大小,但我不断收到此错误
( 1 个错误禁止保存此项目: “identify”命令无法识别图像 C:/DOCUME~1/HP_ADM~1/LOCALS~1/Temp/stream,5584,0.jpg。 )
我几乎尝试了我在网上找到的所有内容:
- 将 Paperclip.options[:command_path] = "C:\ImageMagick-6.6.6-Q16" 添加到我的development.rb
- 对project.rb 进行更改(删除单引号)
我我正在使用最新的 Ruby/Rails 和 Paperclip 1.3.3 运行 Windows,
我刚刚开始使用 Rails,但我不知道该怎么做。我知道这是一个常见问题,但我遇到的所有答案都没有帮助。
提前致谢。
Im using Paperclip to size my images but I keep getting this error
( 1 error prohibited this project from being saved:
Image C:/DOCUME~1/HP_ADM~1/LOCALS~1/Temp/stream,5584,0.jpg is not recognized by the 'identify' command. )
Ive tried pretty much everything that I found online:
- Adding Paperclip.options[:command_path] = "C:\ImageMagick-6.6.6-Q16" to my development.rb
- Doing changes to the project.rb (removing single quotes)
I'm running windows with the latest Ruby/Rails and Paperclip 1.3.3
Im just getting into Rails and I have no idea what to do. I know this is a common problem but all of the answers I have come across havent helped.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
通过执行以下操作,我能够使其在 Windows XP 上运行(我的开发环境 - 部署到 Heroku 工作正常):
编辑 config/environments/development.rb 并添加以下内容< /p>
Paperclip.options[:command_path] = "C:/ImageM~1"
终止并重新启动开发服务器以获取新配置。
我无法通过使用“长”窗口路径来使其工作。只有‘~1’怪物。因此,您可能需要做的唯一一件事就是更改
为
I was able to get this to work on Windows XP (my dev environment - deployment to Heroku worked fine) by doing the following:
editing config/environments/development.rb and adding the following
Paperclip.options[:command_path] = "C:/ImageM~1"
Kill and restart the dev server to pick up the new config.
I was not able to get it to work by using "long" windows paths. Only the '~1' monstrosity. So, the only thing you might have to do is change
to
我能够以与 Edward 相同的方式或多或少地使其工作,并添加一些内容:
Paperclip.options[:command_path] = "C:/Imagick6"
I was able to get it working more or less in the same way as Edward, with some additions:
Paperclip.options[:command_path] = "C:/Imagick6"