Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RMagick + Rails + Heroku?

I'm trying to figure out how to get rmagick on my app, and then make it work on Heroku?

like image 608
Elliot Avatar asked Apr 03 '10 22:04

Elliot


3 Answers

For Rails3, you have to add this specification:

gem "rmagick", "2.12.0", :require => 'RMagick'

Note: require is CAsE SeNSITIvE

like image 60
capps Avatar answered Sep 24 '22 07:09

capps


Ok so for future reference heres what needs to be done.

In your .gems file you need:

rmagick

and then in your config/environment.rb file you need:

config.gem "rmagick",
:lib => "RMagick" 

Because its already preinstalled with heroku - this does the trick.

like image 37
Elliot Avatar answered Sep 22 '22 07:09

Elliot


Once I did the following from capps answer.

gem "rmagick", "2.12.0", :require => 'RMagick'

Then I added the require statement to any file uses rmagick it fixed my issue.

require 'RMagick'

This worked on Heroku cedar stack running rails 3.1

like image 43
mattwallace Avatar answered Sep 21 '22 07:09

mattwallace