44

I am getting following error while running local script/server of my Rails project:

This installation of RMagick was configured with ImageMagick 6.6.1 but ImageMagick 6.4.5 is in use. (RuntimeError)

Running identify --version shows the following:

Version: ImageMagick 6.6.1-10 2010-05-21 Q8 http://www.imagemagick.org

So, my question is how and where should I make changes to work it fine; I have already reinstalled ImageMagick but that didn't work.

1
  • what do you get with ruby -e 'require "RMagick"'
    – microspino
    Commented May 22, 2010 at 8:05

8 Answers 8

83

the same thing happened to me but the solution was a bit simpler than uninstalling imageMagick. It sounds like Rmagick's config file isn't updated to use your updated imagemagick so try

sudo gem uninstall rmagick
sudo gem install rmagick

restart your server.

I took a closer look and noticed you had Rmagick configured for a newer imageMagick but using an older imageMagick. So I would assume that my solution would still work but you would not be using the newer ImageMagick.

4
  • 1
    Installing and uninstalling rmagick gem solved the issue for me too.
    – dknight
    Commented Aug 16, 2012 at 10:46
  • 19
    If using bundler: bundle exec gem uninstall rmagick bundle Commented Nov 9, 2012 at 8:02
  • Worked for me too, this was my error: This installation of RMagick was configured with ImageMagick 6.8.6 but ImageMagick 6.8.7-0 is in use
    – Nikola
    Commented Oct 8, 2013 at 2:29
  • Curiously enough, rvmsudo uninstall rmagick and then rvmsudo install rmagick -v 'version.I.need' actually did it. Thanks! :O
    – dimitarvp
    Commented Jan 7, 2015 at 22:15
38

If using bundler:

bundle exec gem uninstall rmagick

bundle install (will reinstall rmagick as part of the bundle)

0
9

I would remove any previous installation and start again by following this page. First of all open a shell and launch:

identify -version

which will give you the IM version installed on your system.

Depending on how You installed IM, find the way to remove It completely from the system. For instance if you used apt-get, try:

sudo apt-get remove ImageMagick

If you installed IM from sources, go to where you have them stored (I mean the sources path/folder) and type:

make uninstall

You can then reinstall ImageMagick, compiling it from the sources:

cd
wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz 
tar zxf ImageMagick.tar.gz 
cd ImageMagick-*/ 
./configure --prefix=$HOME --without-perl
make
make install

Then you have to add $HOME/bin to the beginning of your $PATH

cd
echo "export PATH=$HOME/bin:\$PATH" >> .bash_profile
source .bash_profile

Now it's time to gem install RMagick:

export LD_LIBRARY_PATH=$HOME/lib
gem install rmagick
4
  • Ok, thanks for instant reply i would check that one and get back
    – chaitanya
    Commented May 22, 2010 at 8:11
  • irongaze's answer helped me when I installed in standard /usr/local prefix superuser.com/questions/361435/…
    – Pete Brumm
    Commented Apr 9, 2012 at 18:11
  • Check Skotti's solution below. That's probably what you're looking for: reinstall rmagick gem
    – Viktor
    Commented Oct 9, 2013 at 7:47
  • In my experience, I have to remove another libs in Ubuntu 14.10 related with graphicsmagick like graphicsmagick-libmagick-dev-compat. It seems that Wand-Config and Graphics-Config produce problems too for rmagick
    – shakaran
    Commented Dec 19, 2014 at 10:43
6
RMAGICK_BYPASS_VERSION_TEST = true

Thats a global flag set before requiring rmagick.

from https://bugs.launchpad.net/ubuntu/+source/librmagick-ruby/+bug/565461/comments/2

Worked and tested ok for me.

1

I made it work by uninstalling and then deleting the file listed in the error message (before reinstalling). It seems that uninstalling doesn't always clean up some of the old ".so" files.

0
1

I had the same issue, and eventually concluded that my installation of libmagick9-dev (sudo apt-get install libmagick9-dev ruby1.8-dev) was installing ImageMagick APIs for the lower version. My solution was to uninstall the later versions and go with the Ubuntu packaged versions of ImageMagick and the other libraries.

1

I bumped into this on a Rails app. I tried Scott Montgomerie's answer, but I couldn't get bundle exec gem to work (not sure why, no time to find out).

What worked for me was a simple bundle update rmagick.

1

bundle update rmagick worked for me

Not the answer you're looking for? Browse other questions tagged or ask your own question.