安装rmagick一般在Windows安装Ruby的环境不好,愚蠢的想法! 在你做之前好好思考1000次!!!如何在Windows XP中使用Ruby 1.9.3
我的环境:
- 窗口XP(X32)
- 红宝石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小时痛苦和折磨后,我很幸运地运行'捆绑安装的成功。 顺便说一句,我建议:
- 安装Ruby到C:/ ruby193(而不是 '程序文件' !!!)
- 安装的devkit到C:/的devkit(而不是 '程序文件'! )
我不明白,跆拳道是怎么回事这个问题。现在我有新的错误:) 这是一个神奇的问题ImageMagik(我认为撒旦自己写了这个程序!) 现在我不能安装rmagick,红宝石,的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当我忘记设置checkboxses之一:
现在我在终端中看到新的错误类型:
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 `'
这是什么,我该如何解决它? 请帮我
下载exe文件从http://ftp.sunet.se/pub/multimedia/graphics/ImageMagick/binaries/ – Willing