【问题标题】:How install rmagick in windows XP with ruby 1.9.3如何在 Windows XP 中使用 ruby​​ 1.9.3 安装 rmagick
【发布时间】:2014-01-14 11:11:38
【问题描述】:

通常在 Windows 上安装 Ruby 环境是糟糕和愚蠢的想法!!! 做之前想好1000次!!!

我的环境:

  • Windows XP (x32)
  • ruby 1.9.3p484 (2013-11-22) [i386-mingw32]
  • DevKit-tdm-32-4.5.2-20111229-1559-sfx
  • ImageMagick-6.8.8-2-Q8-x64-static.exe

我正在使用这本手册:https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

我进行了 3 次以上的安装尝试! 购买新笔记本电脑或在您的机器上安装 Linux 更容易更好!!!

经过 4 小时的痛苦和折磨,我很幸运地成功运行了“捆绑安装”。 顺便说一句,我建议:

  1. 将 ruby​​ 安装到 C:/ruby193(而不是“程序文件”!!!)
  2. 将 devkit 安装到 C:/DevKit(而不是“程序文件”!!!)

我不明白 WTF 是怎么回事。现在我有新错误:) 这是 ImageMagik 的一个神奇问题(我认为撒旦自己编写了这个程序!) 现在我无法安装 rmagick,原因是 ruby​​、devkit、ImageMagik 或 rmagik 的一些问题。

我在运行时看到此错误:

gem install rmagick -v '2.13.2' -- '--with-opt-dir="C:\ImageMagick"'

====================================================================== Tue 14Jan14 12:31:38 This installation of RMagick 2.13.2 is configured for Ruby 1.9.3 (i386-mingw32) and ImageMagick 6.8.8 ====================================================================== make generating RMagick2-i386-mingw32.def compiling rmagick.c In file included from rmagick.c:13:0: rmagick.h:81:2: error: #error Specified QuantumDepth is not supported. rmagick.c: In function 'Magick_colors': rmagick.c:42:5: warning: passing argument 2 of 'GetColorInfoList' from incompatible pointer ty C:\ImageMagick\include/magick/color.h:75:5: note: expected 'size_t *' but argument is of type rmagick.c: In function 'Magick_fonts': rmagick.c:90:5: warning: passing argument 2 of 'GetTypeInfoList' from incompatible pointer typ C:\ImageMagick\include/magick/type.h:98:5: note: expected 'size_t *' but argument is of type ' rmagick.c: In function 'Magick_init_formats': rmagick.c:178:5: warning: passing argument 2 of 'GetMagickInfoList' from incompatible pointer C:\ImageMagick\include/magick/magick.h:129:5: note: expected 'size_t *' but argument is of typ make: *** [rmagick.o] Error 1 Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/rmagick-2.13.2 for insp Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/rmagick-2.13.2/ext/RMagick/gem_make.out

几个小时后,我明白了,我面临这个问题, 因为在安装 ImageMagik 时我忘记设置其中一个复选框:

现在我在终端中看到了新的错误类型:

C:\Documents and Settings\Bogdan>gem install rmagick -v '2.13.2' -- '--with-opt-dir="C:\ImageMagick"' Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing rmagick: ERROR: Failed to build gem native extension. C:/Ruby193/bin/ruby.exe extconf.rb --with-opt-dir="C:\ImageMagick" 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 --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:/Ruby193/bin/ruby C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp' from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:931:in `block in have_header' from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for' from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone' from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:254:in `open' from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone' from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:254:in `open' from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:280:in `postpone' from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for' from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:930:in `have_header' from extconf.rb:194:in `'

它是什么,我该如何解决? 请帮帮我

【问题讨论】:

    标签: windows webkit imagemagick rmagick ruby-1.9.3


    【解决方案1】:

    哇!!!这是某种喜剧, 但我卸载 ImageMagick-6.8.8 并安装 ImageMagick-6.6.7。

    C:\Documents and Settings\Bogdan>gem install rmagick -v '2.13.2' -- '--with-opt-dir="C:\ImageMagick"' Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... Successfully installed rmagick-2.13.2 1 gem installed Installing ri documentation for rmagick-2.13.2... Installing RDoc documentation for rmagick-2.13.2...

    成功安装 RMAGICK-2.13.2 !!!!!!

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-24
    • 2012-11-30
    相关资源
    最近更新 更多