【发布时间】:2013-12-02 21:52:18
【问题描述】:
原帖在这里:“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>'
有人有什么想法吗?
【问题讨论】:
-
为什么不能更改专门用于开发的gem?
-
你在安装什么 gem?试试 byebug
-
对 2.0 之后的红宝石使用
debugger不是一个好主意。我不明白你为什么被困在debugger上。您无法控制自己的开发环境? -
我坚持使用
debugger,因为它是pry-debugger的依赖项,我们在开发中非常依赖它。 -
然后试试
pry-byebug