Welcome to the rmagick wiki!
Install ImageMagick binary version: http://www.imagemagick.org/script/binary-releases.php#windows . The last known version to work is 22.214.171.124. Find archived versions of ImageMagick here http://www.imagemagick.org/download/windows/legacy/ . If you try a newer version such as 6.8, you will get compile errors such as http://pastebin.com/j4vM5kLa . If you don't want to compile it from source, you can find legacy binary versions at http://ftp.sunet.se/pub/multimedia/graphics/ImageMagick/binaries/.
ImageMagick must be installed with the development headers option (install lib and include directories)
Set ImageMagick to be first in your system path:
If ImageMagick isn't first in your system path, you'll get an "Invalid drive specification" error when extconf.rb tries to identify the ImageMagick version.
Ensure you have a compiler on your command line, such as MingW in DevKit (which comes packaged with RailsInstaller.org).
Install the rmagick gem. You can get rmagick to compile on Windows with the command:
gem install rmagick -- '--with-opt-dir="[path to ImageMagick]"'
There are three noteworthy things about this command:
5.1. There's a double-dash separating "rmagick" and the --with-opt-dir option
5.2. The --with-opt-dir option is surrounded by single-quotes
5.3. The path to the ImageMagick directory is surrounded by double-quotes
You can have spaces in the path to the ImageMagick directory if you use this syntax. I think the path also doesn't care about forward or backward slashes, but I use backslashes.
Edit C:\RailsInstaller\Ruby1.9.3\setup_environment.bat to include the path to ImageMagic, line 25:
All that said, I've experienced failures to build with some version pairings of rmagick and ImageMagick. I was able to get ImageMagick 6.7.7 and rmagick 2.13.1 to build together on both Windows 7 and Server 2003. Below is a transcript building ImageMagick 6.7.9 and rmagick 2.13.1 on Windows XP:
C:\Sites>gem install rmagick -- '--with-opt-dir="c:\RailsInstaller\ImageMagick-6.7.9-Q8"' Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... 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...
gem install rmagick
$ gem install rmagick Fetching: rmagick-2.13.1.gem (100%) Building native extensions. This could take a while... Successfully installed rmagick-2.13.1 1 gem installed
Last edited by dabavil,