Your eyes are just like Ruby

How to install RMagick on Windows.

Last Modified: 2017-03-28 (Tue) 12:37:55 (25d)


The purpose of this page is to install RMagick on Windows. I have installed RMagick on Windows 7 and 10.

RMagick is a special in the following points.

  • Using a native code by C language.
  • Using ImageMagick. ImageMagick is a image editing software.

So, you will need to:

  • Install ImageMagick.



You don't know details, please read here.

2. Install ImageMagick

  • You must be careful to choose a version.--RMagick 2.16.0 is not support ImageMagick 7, you must install ImageMagick 6.
    • To use the dll version, static version can not be used.
    • x86 / x64 will be selected in accordance with the Ruby environment.
    • Such as Q8 / Q16 is anything good.
  • To download the ImageMagick 6 will choose the old binary, which is put under the binaries directory of ImageMagick official site.
  • During the installation, the following selection in the screen of Select Addtional Tasks.
    • Add application directory to your system path
    • Install development headers and libraries for C and C++

3. Set environment variables

When RMagick compilation, through the path to ImageMagick of include files and library files are visible.

  • CPATH = {ImageMagick install directory}/include
  • LIBRARY_PATH = {ImageMagick install directory}/lib

4. Install RMagick

Run the following command to install the RMagick.

gem install rmagick

This command will do the following:

  • Download RMagick
  • Compilation by DEVELOPMENT KIT
  • Install

If this does not work, please refer to the TROUBLESHOOTING.

5. Verify RMagick installation

This command will do the following:

gem list --local rmagick

Please make sure that it is output as follows.

*** LOCAL GEMS ***

rmagick (X.X.X)

Run the following command, let's make sure that RMagick runs.

ruby -e "require 'rmagick';puts Magick::colors"

It is okay if the output is a list of colors as follow.

name=AliceBlue, compliance=AllCompliance,,,, color.opacity=0 
name=AntiqueWhite, compliance=AllCompliance,,,, color.opacity=0 
name=AntiqueWhite1, compliance=X11Compliance,,,, color.opacity=0 
name=AntiqueWhite2, compliance=X11Compliance,,,, color.opacity=0 


Choose a ImageMagick version

When the bad version combination of ImageMagick an RMagick, you may not be able to install.

Please refer to the following.


It is performance reporting welcome. Please write a comment.

Supplemental: About Q8/Q16, x86/x64, dll/static

First of all, The difference of Q8/Q16 is the number of internal representation bit of color in ImageMagick.

Q88 bits to each element of the RGB
Q1616 bits to each element of the RGB

If there is no special requirements, I think that may be the Q16.

Then the difference of x86/x64 is whether the 32-bit(x86) version or a 64-bit(x64) version. Please according to the Ruby environment that you are using.

Even in the OS is 64-bit, if you are using the 32-bit Ruby will use for the 32-bit ImageMagick.

Finally the difference of dll/static is whether you can use the functions of the ImageMagick from outside.

dllFunctions from the outside available
staticFunctions from the outside is not available

Always use the dll when using RMagick.




Comments here.

No comment. Comments/rmagick/howtoinstall/windows/en