HowTo install rmagick gem on Windows » History » Version 2

Etienne Massip, 2012-05-25 13:28

1 1 Etienne Massip
h1. HowTo install @rmagick@ gem on Windows
2 1 Etienne Massip
3 1 Etienne Massip
{{>toc}}
4 1 Etienne Massip
5 1 Etienne Massip
h2. Prerequisite
6 1 Etienne Massip
7 1 Etienne Massip
You need to have the "DevKit":http://rubyinstaller.org/add-ons/devkit installed.
8 1 Etienne Massip
9 1 Etienne Massip
h2. Installation of "ImageMagick":http://www.imagemagick.org
10 1 Etienne Massip
11 1 Etienne Massip
Download last setup package from http://www.imagemagick.org/script/binary-releases.php#windows and run it.
12 1 Etienne Massip
13 1 Etienne Massip
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 1 Etienne Massip
15 1 Etienne Massip
!ImageMagick_setup_options.png!
16 1 Etienne Massip
17 1 Etienne Massip
h2. Installation of the @rmagick@ gem
18 1 Etienne Massip
19 1 Etienne Massip
* open a new command prompt
20 1 Etienne Massip
* 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)
21 1 Etienne Massip
22 1 Etienne Massip
For example:
23 1 Etienne Massip
24 1 Etienne Massip
 @set CPATH=C:\Program Files\ImageMagick-6.7.7-Q16\include@
25 1 Etienne Massip
@set LIBRARY_PATH=C:\Program Files\ImageMagick-6.7.7-Q16\lib@
26 1 Etienne Massip
27 1 Etienne Massip
* actually install the gem, e.g. with @gem install rmagick@ or @bundle install --without=development test@, etc.
28 1 Etienne Massip
29 1 Etienne Massip
Result:
30 1 Etienne Massip
!rmagick_installation_prompt.jpg!
31 2 Etienne Massip
!redmine_informations.png!