2014-01-24 76 views
0

我想安裝ImageMagick的。我使用Windows 7,因爲我想創建一個Ruby的圖像,但是,當我用命令gem install rmagick同時使用Git的Bash的屏幕命令,我得到這個錯誤安裝在Windows 7上RMagick錯誤創建圖像使用Ruby

c:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb 
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 
    --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=c:/RailsInstaller/Ruby1.9.3/bin/ruby 
c:/RailsInstaller/Ruby1.9.3/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:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp' 
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:931:in `block in have_header' 
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for' 
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone' 
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:254:in `open' 
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone' 
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:254:in `open' 
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:280:in `postpone' 
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for' 
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/mkmf.rb:930:in `have_header' 
    from extconf.rb:194:in `<main>' 

回答

0

安裝DEV-工具包的Windows C C++擴展http://rubyinstaller.org/add-ons/devkit/

+0

肯定錯誤發生在我身上,我插件talled的devkit在我的路徑爲c:/的devkit和安裝在我的路徑C的ImageMagick-6.8.8-Q8:/ImageMagick-6.8.8-Q8 – Astm

+0

的錯誤提示的devkit是找不到的。檢查你的路徑變量並啓動一個新的終端並嘗試。 – Rubyman

+0

DevKit安裝在我的電腦上的路徑c:/ DevKit – Astm

0

蓋伊
finaly我得到了真正方法在Windows上安裝它7

1-安裝在路徑C的ImageMagick-6.7.9-0-Q16 - 窗口static.exe:/ ImageMagic
2-安裝ImageMagick-6.7.9-0-Q16-wind在路徑C:/ ImageMagic中的ows-dll.exe
3-提取文件夾中的ImageMagick-6.8.8-2.tar並將其重命名爲SourceCode,然後將其設置爲路徑C:/ ImageMagic/SourceCode
4-在路徑C的mingw安裝-GET-SETUP.EXE:/ MinGW的
5-定義環境變量用於用戶
PATH - C:\ MinGW的\ BIN;

6-所使用的命令(寶石安裝rmagick - '--with-OPT-DIR = 「C:/ ImageMagick的」')
7 - 開放的Gemfile並設置(寶石 'rmagick')
8 - 鍵入命令(包安裝)

你可以按照本文
https://github.com/rmagick/rmagick/wiki

,因爲我安裝了ImageMagick的版本6.8

相關問題