最初发布在这里:“How to use the debugger with Ruby 2.0?”
我一直在这里结束,但我有一个不同的问题。我现在无法选择改为Byebug。我们目前暂时停留在“调试器”上,我无法安装它。
Building native extensions. This could take a while...
ERROR: Error installing debugger:
ERROR: Failed to build gem native extension.
/Users/mbridges/.rbenv/versions/2.0.0-p247/bin/ruby extconf.rb
*** 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=/Users/mbridges/.rbenv/versions/2.0.0-p247/bin/ruby
/Users/mbridges/.rbenv/versions/2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in `require': cannot load such file -- debugger/ruby_core_source (LoadError)
from /Users/mbridges/.rbenv/versions/2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in `require'
from extconf.rb:16:in `<main>'
有人有什么想法吗?
答案 0 :(得分:0)
更新:现在Ruby 2.1+应该使用byebug而不是调试器。
C:\git\debugger-ruby_core_source
C:\git\debugger-ruby_core_source\lib
复制到C:\Ruby200\lib\ruby\gems\2.0.0\gems\debugger-ruby_core_source-1.3.2
gem install debugger
。我现在确定为什么gems debugger-ruby_core_source没有将lib复制到该文件夹,但debugger肯定需要它。