简体   繁体   中英

Rails install of ImageMagick X11 missing on Windows

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM