2012-04-06 92 views
1

Hiall,rmagick安裝在紅寶石和導軌中的錯誤

我是ROR的新手。我正試圖在本地機器上安裝rmagick。當我嘗試安裝它時,每次出現以下錯誤: 請幫助我解決這種情況。

D:\ruby\bin>gem install rmagick --platform=ruby -- --with-opt-lib=D:\ruby\Rmmagik\lib --with-opt-include=D:\ruby\Rmmagik\include 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. 

D:/ruby/bin/ruby.exe extconf.rb --with-opt-lib=D:\ruby\Rmmagik\lib --with-opt-include=D:\ruby\Rmmagik\include 
checking for Ruby version >= 1.8.5... yes 
checking for stdint.h... yes 
checking for sys/types.h... yes 
checking for wand/MagickWand.h... no 

Can't install RMagick 2.13.1. Can't find MagickWand.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 
--without-opt-dir 
--with-opt-include=${opt-dir}/include 
--with-opt-lib=${opt-dir}/lib 
--with-make-prog 
--without-make-prog 
--srcdir=. 
--curdir 
--ruby=D:/ruby/bin/ruby 
Gem files will remain installed in D:/ruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1 for inspection. 
Results logged to D:/ruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/gem_make.out 

在此先感謝

Surjan

回答

1

你錯過了一個頭文件。

它看起來像你在Windows上,對不對?

如果是這樣,一個簡單的解決方案可能是下載用於Windows的預構建的ImageMagick二進制文件。

http://www.imagemagick.org/script/binary-releases.php?ImageMagick=rdfgqvr16sq8ngvahkosd26om0#windows

如果你在Debian或Ubuntu:

sudo apt-get install imagemagick libmagickcore-dev libmagickwand-dev 

(編輯,隨意添加其他平臺的解決方案)

+0

喬您好,感謝您的答覆,是的,我我已經下載了Windows的exe文件:「ImageMagick-6.7.6-4-Q8-windows-dll.exe」,並將其安裝在此路徑下「D:\ ruby​​ \ Rmmagik \」,另外我也有爲相同的類和lib路徑設置。在這方面請幫助我 – 2012-04-06 07:31:58