如何在Windows XP中安装rmagick与ruby1.9.3

一般在Windows上安装Ruby环境是BAD和STUPID的想法! 在你做之前好好思考1000次!

我的环境:

  • Windows XP(x32)
  • ruby1.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个小时的痛苦和痛苦,我幸运地成功运行“捆绑安装”。 顺便提一下,我build议:

  1. 安装ruby到C:/ ruby​​193(不进入“程序文件”!!!)
  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
====================================================================== 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时,我忘了设置checkbox之一:

在这里输入图像说明

现在我在terminal中看到新的错误types:

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 `'
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 `' 

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

在这里输入图像说明

哇!!! 这是某种喜剧,但是我卸载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...
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 !!!!!!