If you are reading this, chances you’ve spent the last couple of hours trying to install RMagick gem on Windows are pretty high.
I tried several tutorials but none of them discussed how to solve the “CORE_RL_magick_.dll not found” error. Stackoverlow wasn’t very helpful too. But finally I’ve managed to install it and now it works fine. That’s how I did it.
- Go here
- Download ImageMagick 6.6.1-10 32bit dynamic or any other version except the currently latest release 6.6.9, which has some DLL issues. I got version 6.6.1.
- Install it with somewhere without spaces in the path. Select these options: “Add to PATH” and “development header”. After the installation is complete it should give you a message box saying that dll was registered successfully.
- In the command line type “convert -version” to check if everything works. It should print something like:
Version: ImageMagick 6.6.1-10 2010-05-15 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC Features: OpenMP
- Install the DevKit if you don’t have it yet.
- Install the rmagick gem:
gem install rmagick --platform=ruby -- --with-opt-lib=c:/ruby192/ImageMagick/lib --with-opt-include=c:/ruby192/ImageMagick/include
It should print
Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while...
The message doesn’t lie. It took about 4-5 minutes on my machine. If everything goes right, you should see
Successfully installed rmagick-2.13.1 1 gem installed Installing ri documentation for rmagick-2.13.1... Installing RDoc documentation for rmagick-2.13.1...
And that’s it. Hope this saves somebody from wasting several hours in frustration.