安裝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