Project

General

Profile

HowTo install rmagick gem on Windows » History » Version 3

John Pankowicz, 2014-10-31 03:24

1 1 Etienne Massip
h1. HowTo install @rmagick@ gem on Windows
2
3
{{>toc}}
4
5
h2. Prerequisite
6
7
You need to have the "DevKit":http://rubyinstaller.org/add-ons/devkit installed.
8
9
h2. Installation of "ImageMagick":http://www.imagemagick.org
10
11
Download last setup package from http://www.imagemagick.org/script/binary-releases.php#windows and run it.
12
13
In the ??Select Additional Tasks?? page of the wizard, make sure that  both ??Add application directory to your system path?? and ??Install development headers and libraries for C and C++?? options are checked:
14
15
!ImageMagick_setup_options.png!
16
17 3 John Pankowicz
Note: Both the ImageMagick application directory and the Windows System32 directory contain an executable named "convert.exe". Unless ImageMagick's directory is added the front of the system path, its copy will not be found. This will cause the test suggested at the completion of the installation to fail with a message "Invalid Drive Specification". Also note that Window's copy of "convert.exe" will not be found, if ImageMagick is placed first in the path. 
18
19 1 Etienne Massip
h2. Installation of the @rmagick@ gem
20
21
* open a new command prompt
22
* set @CPATH@ and @LIBRARY_PATH@ environment variables to point respectively to @ImageMagick@ installation directory @include@ and @lib@ subdirectories (so the DevKit will find them at build time)
23
24
For example:
25
26
 @set CPATH=C:\Program Files\ImageMagick-6.7.7-Q16\include@
27
@set LIBRARY_PATH=C:\Program Files\ImageMagick-6.7.7-Q16\lib@
28
29
* actually install the gem, e.g. with @gem install rmagick@ or @bundle install --without=development test@, etc.
30
31
Result:
32
!rmagick_installation_prompt.jpg!
33 2 Etienne Massip
!redmine_informations.png!