简体   繁体   English

回形针在Heroku上使用Papercrop和ImageMagick失败

[英]Paperclip fails on Heroku with Papercrop and ImageMagick

I have a Rails 5 app where users (devise) can upload a profile image and crop it if need be (Using Paperclip and Papercrop). 我有一个Rails 5应用程序,用户(设计人员)可以在其中上传个人资料图像,并在需要时裁剪(使用Paperclip和Papercrop)。 Everything works on local. 一切都在本地工作。 No problem at all. 没问题

When I push it to Heroku and try to crop I get the following error: (Paperclip::Errors::NotIdentifiedByImageMagickError) 当我将其推到Heroku并尝试裁剪时,出现以下错误:(Paperclip :: Errors :: NotIdentifiedByImageMagickError)

I have looked at all SO questions out there and there are no replies that seem to work. 我已经查看了所有SO问题,并且似乎没有任何答复。 Anyone had any luck solving this before? 有人以前有运气解决过这个问题吗?

As mentioned - Locally it runs great. 如前所述-在本地运行良好。 On Heroku it fails. 在Heroku上失败。 Could it be an update required to ImageMagick on Heroku? 它可能是Heroku上ImageMagick所需的更新吗?

It should be something related to Heroku's environment. 它应该与Heroku的环境有关。

Did you try that link? 您是否尝试过该链接? https://github.com/thoughtbot/paperclip/wiki/Upgrade-Imagemagick-On-Heroku https://github.com/thoughtbot/paperclip/wiki/Upgrade-Imagemagick-On-Heroku

It also can be that you cannot write on Heroku machine file system, maybe your image stills in memory and tries to save when you crop it, where are you saving it? 也可能是您无法在Heroku机器文件系统上写入,也许您的图像仍然在内存中,并在裁剪时尝试保存,该保存在哪里?

Reference: Paperclipped on Heroku? 参考: Paperclipped在Heroku上?

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

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