简体   繁体   English

Windows上缺少ImageMagick X11的Rails安装

[英]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 我正在尝试为运行Rails的Windows 7x64安装ImageMagick,但仍然遇到问题

The problem is that I still can't get it to work. 问题是我仍然无法正常工作。 I've tried 我试过了

bundle install 捆绑安装

gem install rmagick --platform=ruby 宝石安装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. 我也得到了检查Ruby版本> = 1.8.5的错误文本...是,检查stdint.h ... * extconf.rb失败*由于某种原因,可能无法创建Makefile,可能缺少必要的库和/或头文件。 Check the mkmf.log file for more details. 检查mkmf.log文件以获取更多详细信息。 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 我还应该提到,我已经看到帮助站点引用了ImageMagick的include目录和lib目录,但是我下载了许多版本的ImageMagick,但都没有提供include或lib目录。

We ended up moving to Mini Magick, as Matt suggested, and were able to make it work with that. 正如Matt所建议的,我们最终选择了Mini Magick,并使其能够正常工作。 RMagick's memory leaking issues and the fact that it's not being kept up made Mini Magick more appealing. RMagick的内存泄漏问题以及未及时解决的事实使Mini Magick更具吸引力。

Not really a solution, but it's what we've got. 并不是真正的解决方案,但这就是我们所拥有的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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