我嘗試使用下面的命令來安裝RmMagic:錯誤安裝rmagick:錯誤:未能建立寶石原生擴展
gem install rmagick -v=2.12.2
運行此命令後,我得到了一些錯誤:
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 checking for Ruby version >= 1.8.5... yes Invalid drive specification. Unable to get ImageMagick version *** 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 --without-opt-include=${opt-dir}/include --with-opt-lib --without-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 .12.2 for inspection. Results logged to D:/ruby/lib/ruby/gems/1.8/gems/rmagick-2.12.2/ext/RMagick /gem_make.out
請在這方面幫助我。提前致謝。
嗨穆克什,感謝您的答覆,但我想你已經在上述消息中提到的方式,但我仍然面臨着同樣的問題,我正在研究紅寶石1.8.7和軌道2.3.5 – 2012-04-05 18:32:50
檢查此問題http://stackoverflow.com/questions/3940554/cant-install-rmagick-and-imagemagick-on-windows -7 – Mukesh 2012-04-09 12:37:47
@Mukesh:謝謝,這對我很有用,但我不必做環境變量的東西。這裏是我的確切步驟:1 - 將ImageMagick-6.5.6-Q8安裝到C:\。 2 - 安裝時,請檢查所有包裝箱。 3-run'gem install rmagick -v'2.12.1' - --with-opt-lib = C:\ ImageMagick-6.5.6-Q8 \ lib --with-opt-include = C:\ ImageMagick-6.5 1.6 Q8 \ include'。這終於爲我工作,併成功安裝。 – Travesty3 2012-08-07 13:10:14