2011-03-16 61 views
1

我試圖使用Ruby中彙總的寶石,但是當我做寶石安裝總結,我得到:問題建築總結寶石

Building native extensions. This could take a while... 
ERROR: Error installing summarize: 
    ERROR: Failed to build gem native extension. 

C:/dev/Ruby/bin/ruby.exe extconf.rb 
creating Makefile 

nmake 

Microsoft (R) Program Maintenance Utility Version 1.50 
Copyright (c) Microsoft Corp 1988-94. All rights reserved. 

cl -nologo -I. -IC:/dev/Ruby/lib/ruby/1.8/i386-mswin32 -IC:/dev/Ruby/lib 
/ruby/1.8/i386-mswin32 -I. -MD -Zi -O2b2xg- -G6 -c -Tcarticle.c 
cl : Command line warning D4029 : optimization is not available in the standard 
edition compiler 
cl : Command line warning D4002 : ignoring unknown option '-Og-' 
article.c 
article.c(21) : fatal error C1083: Cannot open include file: 'stdio.h': No such 
file or directory 
NMAKE : fatal error U1077: 'C:\Windows\system32\cmd.exe' : return code '0x2' 
Stop. 

Gem files will remain installed in C:/dev/Ruby/lib/ruby/gems/1.8/gems/summarize- 
1.0.3 for inspection. 
Results logged to C:/dev/Ruby/lib/ruby/gems/1.8/gems/summarize-1.0.3/ext/summari 
ze/gem_make.out 

任何想法?

+0

你有紅寶石的devkit? – 2011-03-16 22:59:59

回答

0

您正在使用Microsoft C++編譯器。安裝MinGW:它是你在* nixes(包括GCC,GNU編譯器)中找到的POSIX工具集的一個端口。

http://www.mingw.org/

如果使用RubyInstaller安裝Ruby,還有的MinGW的一個很好的包裝版本,你建議使用:

http://rubyinstaller.org/add-ons/devkit/