Problem Installing Ruby-Debug on Windows

佐手、 提交于 2020-01-06 01:51:31

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!