Installing RMagick Gem On Windows With RubyInstaller

At work, I'm trying to get a copy of Redmine running on a Windows box (unfortunately I don't have a *nix box to use). I found the RailsInstaller package that sets you up with a solid base package, but in order to use Redmine you need a bunch of gems with native extensions compiled.

RMagick was, in particular, giving me grief. Thankfully after some digging I found a solution to my issue.

  1. Install RMagick with the development headers (look for the option in the installer, disabled by default).
  2. In the RailsInstaller command prompt, run the following:

    set CPATH=D:\installs\ImageMagick-6.6.2-Q16\include
    set LIBRARY_PATH=D:\installs\ImageMagick-6.6.2-Q16\lib
    gem install rmagick

Original Source