0
votes

I can't get debugger installed to work in my ruby files. Can anyone see what the problem is?

I did 'require debugger' at the top of my file.rb and got this error when I ran ruby file.rb

rubygems/custom_require.rb:36:in `require': cannot load such file -- debugger (LoadError)

I did gem install debugger on my system but got this error message.

ERROR:  Error installing debugger:
    ERROR: Failed to build gem native extension.

        /Users/mm/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
Makefile creation failed
**************************************************************************
No source for ruby-1.9.3-rc1 provided with debugger-ruby_core_source gem.
**************************************************************************
*** 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/michaeljohnmitchell/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby
    --with-ruby-dir
    --without-ruby-dir
    --with-ruby-include
    --without-ruby-include=${ruby-dir}/include
    --with-ruby-lib
    --without-ruby-lib=${ruby-dir}/lib

When I run gem environment, I get

  • RUBYGEMS VERSION: 1.8.10
    • RUBY VERSION: 1.9.3 (2011-09-23 patchlevel -1) [x86_64-darwin10.8.0]
    • INSTALLATION DIRECTORY: /Users/michaeljohnmitchell/.rvm/gems/ruby-1.9.3-rc1@global
    • RUBY EXECUTABLE: /Users/michaeljohnmitchell/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby
    • EXECUTABLE DIRECTORY: /Users/michaeljohnmitchell/.rvm/gems/ruby-1.9.3-rc1@global/bin
    • RUBYGEMS PLATFORMS:
    • ruby
    • x86_64-darwin-10
    • GEM PATHS:
      • /Users/mm/.rvm/gems/ruby-1.9.3-rc1@global
    • GEM CONFIGURATION:
      • :update_sources => true
      • :verbose => true
      • :benchmark => false
      • :backtrace => false
      • :bulk_threshold => 1000
      • :sources => ["http://rubygems.org/", "http://gems.github.com/"]
    • REMOTE SOURCES:
1

1 Answers

3
votes

You're using an old prerelease version of Ruby that debugger doesn't support. The actual release version of Ruby 1.9.3 has been out for some time, and upgrading to Ruby 1.9.3-p194 (which debugger supports) will allow it to install.