Skip to content
Jan 4 / Rupak Ganguly

How to install RMagick + ImageMagick on Windows

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

I have installed RMagick and Image Magick on many Windows machines and I have stumbled across various kinds of errors, and finally I have decided to document them so that I could not only document it for myself, but for other people like me, who are stuck due to these errors.

The issues that I have faced are as follows:

A. This version of RMagick was created to run with ImageMagick 6.3.0 but ImageMagick 6.3.5 is installed on this system. You should either
1) Configure and build RMagick for ImageMagick 6.3.5, or
2) download ImageMagick 6.3.0 from http://www.imagemagick.org and install it.
B. Errors about missing CORE_.. .dll file(s).
C. Errors about missing sqlite3.dll.

Issue A. stems from the fact that you have a incompatible version of ImageMagick installed which does not work with RMagick. The solution would be to uninstall any existing ImageMagick and/or RMagick gem, and start all over as described below.

Issue B. tells me that either ImageMagick or RMagick is not installed properly.

Issue C. is a bit off and has nothing to do with ImageMagick or RMagick. It is probably being thrown by the plugin or application that you are using that needs ImageMagick or RMagick. To fix this issue, just install Sqlite3 and I have a post just for that.

Now that we have tackled the issues, let’s get to the goal – how to install RMagick + ImageMagick on Windows.

  1. 1. Uninstall any Image Magick or RMagick gem from before.
  2. Download rmagick-win32 for windows that has the gem and the ImageMagick installer from http://rubyforge.org/frs/download.php/64917/RMagick-2.12.0-ImageMagick-6.5.6-8-Q8.zip
  3. Unzip the rmagick-win32 zip file that you downloaded above.
  4. Install the ImageMagick from the installer that came in the zip i.e. run the ImageMagick-6.5.6-8-Q8-windows-dll.exe. This will install ImageMagick for you.
  5. Now, we need to install the rmagic gem that came in the zip i.e. rmagick-2.12.0-x86-mswin32.gem. To do that, run the following command on a windows command line:
    > gem install <path where you downloaded and then unzipped the rmagick zip>\rmagick-2.12.0-x86-mswin32.gem
    Note: When you read this post, the version nos. of the gem and the zip file may change. Please adjust your commands for that.
  6. If you get Issue C., from above you probably are left with installing Sqlite3. If you need help you can look up my post.
  7. That should get you going. Yet another big Ruby on Rails development hurdle on Windows, solved for good. If you have any other issues or questions regarding the subject, please let me know via comments. I will try my best to help you.

8 Comments

leave a comment
  1. Ger / Feb 26 2010

    Great, concise tutorial! Thx

  2. Rupak Ganguly / Feb 26 2010

    Hi Ger,
    It is a pleasure to see that my notes helped you. I try to cover the quirky problems that we face especially for people on Windows.

  3. Sardor / Mar 13 2010

    Thx…

  4. Brian Dunning / Mar 30 2010

    I installed as described above. Everything seems to be fine so far. No errors reported.

    Then when I try to start WEBrick I get the following error. I’ve been scanning Google searches for anything that comes close, but yours is the first site with anything vaguely connected.

    I had Ruby 1.9 but got incompatibility problems once I tried to get Image Magick going. I therefore installed 1.8.6 as recommended.

    I’m running (trying to run) on Vista. ANY help would be appreciated.

    => Booting WEBrick
    => Rails 2.3.5 application starting on http://0.0.0.0:3000
    F:/ruby186/lib/ruby/gems/1.8/gems/rmagick-2.12.0-x86-mswin32/ext/RMagick2.so: 14001: The application has failed to start because its side-by-side conf
    tion is incorrect. Please see the application event log for more detail. – F:/ruby186/lib/ruby/gems/1.8/gems/rmagick-2.12.0-x86-mswin32/ext/RMagick2
    LoadError)
    from F:/ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require’
    from F:/ruby186/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require’
    from F:/ruby186/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in’
    from F:/ruby186/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require’
    from F:/ruby186/lib/ruby/gems/1.8/gems/rmagick-2.12.0-x86-mswin32/lib/RMagick.rb:11
    from F:/ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’
    from F:/ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require’
    from F:/ruby186/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require’
    … 8 levels…
    from F:/ruby186/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:84
    from F:/ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require’
    from F:/ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’
    from script/server:3

  5. rajeshrs / Apr 3 2010

    Superbly working…great. Thanks.

  6. Bindu / May 3 2010

    Thanx…I struck in my project with Rmagick and it really helped me.

  7. Amy / Jun 5 2010

    Thx…

  8. Ben / Aug 16 2010

    Just a note to say this won’t work on Ruby 1.9. I get a segmentation fault when ‘requiring’ RMagick in IRB.

Leave a Comment