I ran into a lot of problems trying to install RMagick on my 64bits Windows, but finally succeeded.
Here is how:
- Install ImageMagick: version 6.6.9-5 32 bits. The version is important: I tried with 64bits versions, and also with 6.6.9-9 and 6.7.* versions and it failed miserably. You can find it here. Don’t forget to include development headers for C and C++ and also modify the PATH environment variable during the installation process.
- Install the Ruby Development Kit. You can find it here.
- Modify a little header in the DevKit. Search for the file
, and replace/mingw/include/sys/types.h int
withlong
at line 115:#ifndef _SIGSET_T_ #define _SIGSET_T_ typedef int _sigset_t; #ifndef _NO_OLDNAMES typedef _sigset_t sigset_t; #endif #endif /* Not _SIGSET_T_ */ #ifndef _SSIZE_T_ #define _SSIZE_T_ typedef long _ssize_t; #ifndef _NO_OLDNAMES typedef _ssize_t ssize_t; #endif #endif /* Not _SSIZE_T_ */
- In a terminal, modify your environment this way:
set DFImageMagick=<ImageMagickInstallationPath> set CPATH=%DFImageMagick%\include;%CPATH% set LIBRARY_PATH=%DFImageMagick%\lib;%LIBRARY_PATH%
- Install RMagick gem:
gem install rmagick
This worked for me, I hope it will help others.