Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RMagick complains it was configured with a different version of ImageMagick

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.

like image 339
chaitanya Avatar asked May 22 '10 07:05

chaitanya


4 Answers

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.

This worked for me hope it helps

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.

like image 106
Skotti Avatar answered Nov 12 '22 05:11

Skotti


If using bundler:

bundle exec gem uninstall rmagick

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

like image 37
Scott Montgomerie Avatar answered Nov 12 '22 04:11

Scott Montgomerie


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
like image 9
microspino Avatar answered Nov 12 '22 04:11

microspino


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.

like image 6
multipolygon Avatar answered Nov 12 '22 04:11

multipolygon