1

Originally posted here: "How to use the debugger with Ruby 2.0?"

I keep ending up back here, but I have a different problem. I don't have the option to change to Byebug right now. We are currently stuck on "debugger" for now, and I cannot install it.

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>'

Anyone have any ideas?

Community
  • 1
  • 1
Matt Bridges
  • 161
  • 9

1 Answers1

0

Update: Now Ruby 2.1+ should using byebug instead of debugger.

  1. clone the debugger-ruby_core_source to local folder, e.g. C:\git\debugger-ruby_core_source
  2. copy C:\git\debugger-ruby_core_source\lib to C:\Ruby200\lib\ruby\gems\2.0.0\gems\debugger-ruby_core_source-1.3.2
  3. run the gem install debugger again.

I'm now sure why the gems debugger-ruby_core_source didn't copy the lib to that folder, but certainly the debugger need it.

Eric Guo
  • 1,755
  • 17
  • 25