ImageMagick - CORE_RL_magick_.dll not found or how to install RMagick on windows with ruby 1.9.2
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:
Go here
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
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.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: OpenMPInstall the DevKit if you haven't already.
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
Ruby on Rails RMagick on Windows 7
First and most important, when reporting issues or asking for help, always include version information about what you're trying to install, specially Ruby.
It seems you're installing using RailsInstaller, but since you didn't mention if is the 2.0 preview version or the stable one, I'll assume you used the stable one, which is based on Ruby 1.8.7-p334.
Now, RailsInstaller already includes the needed pieces: Ruby and RubyInstaller DevKit component, so going to skip the steps about installation of that and jump directly to RMagick itself.
To successfully install RMagick gem, you need ImageMagick binaries with development headers, as documented in RubyInstaller's Tutorial wiki page, which links here
Please download 32bits version of ImageMagick, as Ruby is 32bits.
For my test I've downloaded the installer version ImageMagick-6.7.0-8-Q16-windows-dll.exe
Once downloaded and installed in a path without spaces and I've selected the option Install development headers and libraries for C and C++.
Then open a new Command Prompt, ensure Ruby is available (checking with ruby -v
) and after performed the following command:
gem install rmagick --platform=ruby -- --with-opt-lib=C:\ImageMagick-6.7.0-Q16\lib --with-opt-include=C:\ImageMagick-6.7.0-Q16\include
That command is going to take considerable amount of time (took 1 minute on my Core 2 Duo) but the end result was:
Fetching: rmagick-2.13.1.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed rmagick-2.13.1
1 gem installed
Now you can verify RMagick installed successfully using IRB:
irb(main):001:0> require "rubygems"
=> true
irb(main):002:0> require "rmagick"
=> true
irb(main):003:0> Magick::Version
=> "RMagick 2.13.1"
Now, if you're using Ruby 1.9.2, last RMagick release is not compatible with it and you will need to build from source. There is another tutorial on RubyInstaller wiki that covers that, but please read this thread at RubyInstaller group were we discuss the issues.
Hope all this helps.
how do you get rmagick to work on windows 7 64-bit with rails 3.1 and carrierwave?
Answer in this thread made it work on both of my computer: RMagick on Windows
I hope it'll work for you too !
Rmagick 2.16.0 not building under Windows with MINGW64
rmagick relies on imagemagick below version 7.
Redmine has a pretty good guide on installing it for windows that should help your lib issues.
http://www.redmine.org/projects/redmine/wiki/HowTo_install_rmagick_gem_on_Windows
rmagick not building on windows 7 undefined reference errors
After doing everything in those posts I did the one thing that none of them mentioned. I went and installed the 32bit version of ImageMagick instead of the 64bit. After doing that I used the same command and it installed. I hope that this helps.
RMagick loses the first 8 characters of the file path I am trying to open
My colleague found the solution -
It was to re-install the rmagick gem.
Related Topics
How to Use Bundler Behind a Proxy
Rails Browser Detection Methods
Ruby: Easiest Way to Filter Hash Keys
Unzip (Zip, Tar, Tag.Gz) Files With Ruby
How to Run All Tests With Minitest
Shortcut to Make Case/Switch Return a Value
Fork Child Process with Timeout and Capture Output
Installing Rvm (Ruby Version Manager)
Why Aren't Do/End and {} Always Equivalent
Best Ruby on Rails Social Networking Framework
Need to Split Arrays to Sub Arrays of Specified Size in Ruby
Rails Paperclip How to Delete Attachment
In Ruby, Is There an Array Method That Combines 'Select' and 'Map'
Controller Spec Unknown Keyword: Id
Setspeed in Selenium Webdriver Using Ruby