Heroku:用回形针运行imagemagick [英] Heroku: Running imagemagick with paperclip

查看:249
本文介绍了Heroku:用回形针运行imagemagick的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的Mac OS X电脑上安装了image magick,现在我想将它部署到heroku。我已经在heroku上安装了回形针插件,但上传图片时出现此错误:

  Paperclip :: CommandNotFoundError 

之前我有过这个错误,当时我的电脑上没有imagemagick instaledl,但现在我想要部署它,我如何在heroku上运行image magick? 解决方案

在Heroku的应用程序中包含RMagick Gem?在你的Ruby代码和ImageMagick之间进行连接是必要的。



Image默认是默认的Heroku平台的一部分,但是你必须指定你的应用需要RMagick gem 。我猜你已经在本地安装了它,所以它可以在那里工作,但它从Gemfile或gems清单中缺失(取决于Heroku堆栈版本)。


I have installed image magick on my mac os x computer and now I want to deploy it to heroku. I've installed the the paperclip plugin on heroku but I get this error when uploading an image:

Paperclip::CommandNotFoundError

I had this error before when I didn't have imagemagick instaledl on my computer before but now that I want to deploy it, how do I get image magick to work on heroku?

解决方案

Do you have the RMagick gem included in your app on Heroku? It's necessary for interfacing between your Ruby code and ImageMagick.

ImageMagick is part of the Heroku platform by default, but you have to specify that you need the RMagick gem for your app. I'm guessing you have this installed locally so it works there, but it's missing from your Gemfile or gems manifest (depending on Heroku stack version).

这篇关于Heroku:用回形针运行imagemagick的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆