1

I'm trying to install ImageMagick for my Windows 7x64 running Rails, but keep running into problems

The problem is that I still can't get it to work. I've tried

bundle install

gem install rmagick --platform=ruby

Whenever I do, it errors out with

exe: cannot find -lCORE_RL_magick_
c:/railsinstaller/devkit/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -lX11
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7:   return 0;
8: }
/* end */

I also get error text checking for Ruby version >= 1.8.5... yes checking for stdint.h... * extconf.rb failed * Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.

    Provided configuration options:
            --with-opt-dir
            --without-opt-dir
            --with-opt-include
            --without-opt-include=${opt-dir}/include
            --with-opt-lib
            --without-opt-lib=${opt-dir}/lib
            --with-make-prog
            --without-make-prog
            --srcdir=.
            --curdir
            --ruby=C:/RailsInstaller/Ruby1.9.3/bin/ruby
    C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an
    ror)
    You have to install development tools first.
            from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp'
            from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:931:in `block in have_header'
            from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
            from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
            from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:254:in `open'
            from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
            from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:254:in `open'
            from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
            from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
            from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:930:in `have_header'
            from extconf.rb:194:in `<main>'

I should also mention that I've seen help sites refer to an include directory and a lib directory for ImageMagick, but I've downloaded many versions of ImageMagick and none of them provide an include or lib directory

Community
  • 1
  • 1
Jenny Lang
  • 371
  • 4
  • 8
  • `gem install rmagick --platform=ruby -- --with-opt-lib=c:/ruby193/ImageMagick/lib --with-opt-include=c:/ruby193/ImageMagick/include` did you try this with perfect path of youruby and image magcik – Rajarshi Das Sep 20 '13 at 05:24
  • Actually, I had stupidly installed the wrong version of ImageMagick. Apparently, things work better if I actually follow directions. – Jenny Lang Sep 20 '13 at 05:29
  • You are allowed to answer your own question. It's worth it IMO just to help the next person that missed the specific file name or download location needed to get this working (and there are a lot of versions of ImageMagick). The error messages put you off track too. Just state the version you installed, why that was wrong, and the correct version. Someone will thank you in future! – Neil Slater Sep 20 '13 at 07:38
  • FWIW, MiniMagick was much easier to install on one of my projects. – Matt Sep 20 '13 at 08:27

1 Answers1

1

We ended up moving to Mini Magick, as Matt suggested, and were able to make it work with that. RMagick's memory leaking issues and the fact that it's not being kept up made Mini Magick more appealing.

Not really a solution, but it's what we've got.

Jenny Lang
  • 371
  • 4
  • 8