Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku: Running imagemagick with paperclip

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?

like image 248
devinross Avatar asked Oct 18 '10 22:10

devinross


3 Answers

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).

like image 113
tfe Avatar answered Nov 08 '22 10:11

tfe


Try to remove the Paperclip.options[:command_path] = "/path/to/" when deploying to heroku.

This solved the issue for me.

like image 36
thormarius Avatar answered Nov 08 '22 10:11

thormarius


Add the following to your gemfile...

gem 'rmagick'

like image 3
jmontross Avatar answered Nov 08 '22 10:11

jmontross