I used a script to install ImageMagick http://github.com/masterkain/ImageMagick-sl
After a while, I got ImageMagick installed.
Then I ran sudo gem install rm
If you tried all solutions, of all posts of whole Internet, have installed and reinstalled many times all indicated packages in all Linux or Mac distributions/versions (even in Windows) and it still not working, close your terminal and open it again. Some times, even if your reload all shell environment, only after I reopen the terminal the bundle install was successfully completed.
On CentOS 5.7, I got it to work by first specifying PKG_CONFIG_PATH
:
export PKG_CONFIG_PATH=/usr/local/src/ImageMagick-6.7.5-10/magick/
gem install rmagick
Mac OS Mountain Loin (using Homebrew)
brew install imagemagick
gem install rmagick
I was getting the same error and it got resolved after installing the libmagick9-dev library on ubuntu 11.
Update (Thanks to the commenters - Dec. 2012)
$ sudo apt-get install libmagickwand-dev
or $ sudo apt-get install graphicsmagick-libmagick-dev-compat
for ubuntu 12
$ sudo apt-get install libmagickwand-dev
or $ sudo apt-get install libmagick9-dev
for ubuntu 11 or below.
$ yum install ImageMagick-devel
for centos
$ brew install imagemagick
for Mac OS (using Homebrew)
After several days of searching, my problema was related to some missing libraries, and the one that get the gem installed was this one:
brew install pkg-config
after this I did my bundle install again and it worked.
sudo apt-get install libmagickwand-dev
works well for Ubuntu 12.10
This is assuming you have installed all other dependencies viz.
sudo apt-get install imagemagick ruby ruby-dev gem`