问题
Any suggestions?
C:\Users\Steve\barcoden>gem install ruby-debug
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug:
ERROR: Failed to build gem native extension.
C:/Ruby/bin/ruby.exe extconf.rb
creating Makefile
make
'make' is not recognized as an internal or external command,
operable program or batch file.
Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems/linecache-0.43
for inspection.
Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/linecache-0.43/ext/gem_make.out
C:\Users\Steve\barcoden>
回答1:
as it seems, you're missing a sane build environment for building native extensions. A short explanation: Besides the libraries written in ruby ( there are tons of them ), libraries with bindings to lower-level code written in c exist ( some XML Parsers, RMagick, MySQL.. ). They rely on their low-level counterparts to be installed, and they also need a c compiler to build their interfacing part.
So if you do not have a c-compiler like gcc and the whole build environment ( including make, autoconf and the whole bla ) installed, you won't be able to build those native extensions.
Hope that was of some help :-)
回答2:
Move back to an earlier version of ruby-debug that comes with a precompiled windows binary file so it won't need to build the native extension.
Or follow these instructions or some variant thereof:
http://amitava1.blogspot.com/2008/02/gem-install-ruby-debug-fails-in-windows.html
来源:https://stackoverflow.com/questions/1972549/problem-installing-ruby-debug-on-windows