views:

928

answers:

3

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

A: 

You should just need to add a require statement in whatever class. It's case sensitive!

mike@sleepycat:~/projects/myapp$ heroku console --app myapp
Ruby console for myapp.heroku.com
>> require 'RMagick'
=> []
>> include Magick
=> Object

I don't have that in my .gems file or anything, and there it is in my console, so it seems that it is just there by default.

Mike Williamson
+2  A: 

It depends on which stack you are using on Heroku. The default Aspen stack includes a lot of gems preloaded. For compatibility reasons, the newer Bamboo stack has no preinstalled gems. It is always better to define your gem dependencies in the .gems manifest or in the new bundler style Gemfile.

More info:
Stacks: http://docs.heroku.com/stack
Gems: http://docs.heroku.com/gems

James at Heroku
+1  A: 

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.

Elliot