Project

General

Profile

HowTo install rmagick gem on Windows » History » Revision 8

Revision 7 (Dmitry Popov, 2015-03-03 13:07) → Revision 8/10 (Dmitry Popov, 2015-03-03 13:15)

h1. HowTo install @rmagick@ gem on Windows 

 {{>toc}} 

 h2. Prerequisite 

 You need to have the "DevKit":http://rubyinstaller.org/add-ons/devkit installed. 

 h2. Installation of "ImageMagick":http://www.imagemagick.org 

 You can try to download Download last setup package from http://www.imagemagick.org/script/binary-releases.php#windows, but http://www.imagemagick.org/script/binary-releases.php#windows and run it. 

 However, according to "RMagick wiki":https://github.com/rmagick/rmagick/wiki/Installing-on-Windows, the last known version to work is 6.7.9.9. ImageMagick legacy Legacy binary versions are available at ftp://ftp.sunet.se/pub/multimedia/graphics/ImageMagick/binaries/. 

 Run the setup package. In the ??Select Additional Tasks?? page of the wizard, make sure that    both _Add ??Add application directory to your system path_ path?? and _Install ??Install development headers and libraries for C and C++_ C++?? options are checked: 

 !imagemagick-setup.gif! 

 *Note:* Note: Both the ImageMagick application directory and the Windows\System32 Windows System32 directory contain an executable named _convert.exe_. "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 "Invalid Drive Specification_. Specification". Also note that Window's copy of _convert.exe_ "convert.exe" will not be found found, if ImageMagick is placed first in the path. 

  

 h2. Installation of the @rmagick@ gem 

 * Open a new command prompt. 

 prompt 
 * Change current directory to the Redmine installation directory 

 
 * 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) 

 <pre> 
 set CPATH=C:\Program Files (x86)\ImageMagick-6.7.9-Q16\include 
 set LIBRARY_PATH=C:\Program Files (x86)\ImageMagick-6.7.9-Q16\lib 
 </pre> 

 Install * Actually install the gem by running gem, e.g. with @gem install rmagick@ or @bundle install@. install --without=development test@, etc. 

 !rmagick-install-cmd.gif! 

 h2. Result 

 Check if the installation was successful on the Information page. 

 !rmagick-information.gif!