2

I am trying to deploy my rails 3 app on DreamHost. When I do "bundle install", rmagick causes an error.

configure: error: Can't install RMagick. Can't find Magick-config or GraphicsMagick-config program.
RMagick configuration failed with status 1.

I checked ImageMagick version.

$ convert --version
Version: ImageMagick 6.3.7 11/16/10 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC

And I checked rmagick version

$ ls -d /usr/lib/ruby/gems/1.8/gems/rmagick*
/usr/lib/ruby/gems/1.8/gems/rmagick-1.15.14

As I don't care the version of rmagick, I changed the rmagick version to 1.15.14 in Gemfile. But still it gives the same error.

How do I fix this problem? Is it possible that I omit rmagick in Gemfile and add [require 'RMagick'] somewhere? If so, which file do I add it to?

Thanks.

Sam

Sam Kong
  • 5,472
  • 8
  • 51
  • 87

3 Answers3

2

I was having the same problems, installing libmagickwand did the trick for me...

sudo apt-get install libmagickwand-dev
edwardsharp
  • 1,232
  • 10
  • 17
0

Having ImageMagick is only half of the solution. You also need the development headers. Often this is called ImageMagick-devel or something along those lines and depends on your distribution.

Once you have your development version installed you will get the Magick-config program.

tadman
  • 208,517
  • 23
  • 234
  • 262
  • Actually rmagick is already installed. It's just a old version. I can require 'RMagick' from irb. That means I don't have to reinstall it. Right? – Sam Kong Feb 23 '11 at 21:09
  • If it's already installed, set your `Gemfile` to use that specific version and it won't try and install a new one. Check with `gem list`. – tadman Feb 23 '11 at 21:36
0

This works for me:

  1. Install my own ImageMagick to my home folder: http://wiki.dreamhost.com/Image_Magick#Compiling_ImageMagick_on_your_DreamHost_account

  2. Export relevant path: http://wiki.dreamhost.com/RMagick

Then $ bundle install

Hoang Tran
  • 309
  • 3
  • 6