ImageMagick - “CORE_RL_magick_.dll not found” or how to install RMagick on windows with ruby 1.9.2

一世执手 提交于 2019-11-27 03:40:55
bassneck

I've finally managed to install ImageMagick and build the RMagick gem and make it all work. Hooray.

It seems like the problem was in the DLL itself. When I tried to registed it, windows gave me a nice error about a problem with the dll.

So my way of solving all the issues is:

  1. Go here
  2. Download ImageMagick 6.6.1-10 32bit dynamic or any other version except the currently latest release 6.6.9, which has some DLL issues
  3. Install it with options: Add to PATH and development headers. Installation path should not contain spaces. After the installation it should give you a message box about succesful dll registration.
  4. In the command line type convert -version to check if everything works. It should print something like:

    Version: ImageMagick 6.6.1-10 2010-05-15 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC Features: OpenMP

  5. Install the DevKit if you haven't already.

  6. Install the rmagick gem: gem install rmagick --platform=ruby -- --with-opt-lib=c:/ruby192/ImageMagick/lib --with-opt-include=c:/ruby192/ImageMagick/include

It should print

Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...

And after a few minutes if everything goes right, you should see

Successfully installed rmagick-2.13.1
1 gem installed
Installing ri documentation for rmagick-2.13.1...
Installing RDoc documentation for rmagick-2.13.1...

And that's it. Hope this saves somebody from wasting several hours in frustration.

Just two more links that were helpful: 1 and 2 if you still can't install

This was a pain to get installed. Right now at this moment, I had to reinstall Ruby, Rails, the Devkit and ImageMagick. You're best bet is to do the same and go with the latest versions of all of them except Rails, unless your cool with 3.1. At this moment I am using the latest versions:

ImageMagick-6.7.2-1-Q16-windows-dll - Win32 dynamic at 16 bits-per-pixel

DevKit-tdm-32-4.5.2-20110712-1620-sfx

rubyinstaller-1.9.2-p290

Rails 3.0.9

My system:

Windows 7, x64

My path is a little different from the accepted answer.

My c:/ImageMagick

gem install rmagick --platform=ruby -- --with-opt-lib=c:/ImageMagick/lib --with-opt-include=c:/ImageMagick/include

I installed Ruby first with all the options checked off, then ImageMagick with the "associated path option" and "headers" checked off.

Then set up the devkit easily:

1) cd c:\DevKit
2) ruby dk.rb init
3) ruby dk.rb install

Then afterwards inside of the devkit (c:/devkit) did this and it installed without error:

gem install rmagick --platform=ruby -- --with-opt-lib=c:/ImageMagick/lib --with-opt-include=c:/ImageMagick/include

If you still have issues then maybe this could help you, I was trying this but I am to unfamiliar with setting the environments and getting Step 5 to work: http://www.waydotnet.com/blog/2010/02/rmagick-on-ruby-1-9-1-i386-mingw32-work-d/

The Step 5 I believe can be changed into what i did inside of the Devkit instead, give it a try and good luck!

I'm pretty sure you're going to run into problems trying to run it on Heroku as well because RMagick just acts as a gem to interface with the ImageMagick processing libraries. ImageMagick needs to also be installed on the local machine as well, which I don't know you'll be able to do on Heroku. The ImageMagick installation contains the missing .dll you're after. I use it fairly frequently on a local project. Here's the link:

http://www.imagemagick.org/script/binary-releases.php?ImageMagick=d1l695sitj9h0vdqs78vgebqc5#windows

I'd recommend installing the 64-bit "static" binary from the link above. I've ran into a problem or two trying to use the dll version.

Anyways download it, install it and then add your C:\Program Files\ImageMagick-6.5.6-Q8 (Or wherever yours is installed to) path to your PATH environment variable.

You should then be able to use your RMagick gem properly.

All the best.

user3023914

I followed the steps on this post, but still got a lof of undefined errors. If this is your case as well you might want to try installing the 32 version of imagemagick, despite of having a 64 bit operating system. It worked for me. You can read more about it here: rmagick not building on windows 7 undefined reference errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!