我目前在 Windows XP 32 位机器上运行 Ruby 1.9.2p0。自从我们升级到 Ruby 1.9 后,我根本无法进行任何形式的调试。有人告诉我,您需要新的 ruby-debug19 gem 才能运行。问题是,我公司的代理阻止 gem 依赖管理器连接外部存储库。没关系,我自己下载 gem 本地安装。结果:
ERROR: Error installing ruby-debug19-0.11.6.gem:
ERROR: Failed to build gem native extension.
C:/Ruby192/bin/ruby.exe extconf.rb --with-ruby-include=C:\Ruby192\include
checking for vm_core.h... no
checking for vm_core.h... no
*** 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:/Ruby192/bin/ruby
--with-ruby-dir
--without-ruby-dir
--with-ruby-include=${ruby-dir}/include
--with-ruby-lib
--without-ruby-lib=${ruby-dir}/lib
C:/Ruby192/lib/ruby/1.9.1/net/http.rb:644:in `initialize': A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. - connect(2) (Errno::ETIMEDOUT)
from C:/Ruby192/lib/ruby/1.9.1/net/http.rb:644:in `open'
from C:/Ruby192/lib/ruby/1.9.1/net/http.rb:644:in `block in connect'
from C:/Ruby192/lib/ruby/1.9.1/timeout.rb:44:in `timeout'
from C:/Ruby192/lib/ruby/1.9.1/timeout.rb:87:in `timeout'
from C:/Ruby192/lib/ruby/1.9.1/net/http.rb:644:in `connect'
from C:/Ruby192/lib/ruby/1.9.1/net/http.rb:637:in `do_start'
from C:/Ruby192/lib/ruby/1.9.1/net/http.rb:626:in `start'
from C:/Ruby192/lib/ruby/1.9.1/net/http.rb:1160:in `request'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.4/lib/contrib/uri_ext.rb:239:in `block in read'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.4/lib/contrib/uri_ext.rb:286:in `connect'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.4/lib/contrib/uri_ext.rb:234:in `read'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.4/lib/contrib/uri_ext.rb:128:in `download'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.4/lib/ruby_core_source.rb:55:in `block in create_makefile_with_core'
from C:/Ruby192/lib/ruby/1.9.1/tempfile.rb:320:in `open'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.4/lib/ruby_core_source.rb:51:in `create_makefile_with_core'
from extconf.rb:20:in `<main>'
Requesting http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.gz
Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/linecache19-0.5.11 for inspection.
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/linecache19-0.5.11/ext/trace_nums/gem_make.out
也许我做出了不合理的假设,因为我对 Ruby 还很陌生,但看起来安装脚本正在尝试连接外部存储库以获取某些东西。如果是这样,这很荒谬,如果我能够使用管理器自动安装gem,为什么还要在本地安装gem?有人知道我可以以纯本地离线方式安装调试器的方法吗?我很感激任何帮助。