Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I'm working through Beginning Ruby and am doing the first exercise with the debugger. It has me running ruby -r debug debug_test.rb. The debugger does launch, but not on the file I specified (I've tried several). Instead I get:

Debug.rb
Emacs support available.

/home/henry/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:57: RUBYGEMS_ACTIVATION_MONITOR.enter

I'm not really sure the implications of this, and google provides no insight. In any case, I thought this might be of some use:

(rdb:1) list
[52, 61] in /home/henry/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb
   52      if Gem::Specification.unresolved_deps.empty? then
   53        begin
   54          RUBYGEMS_ACTIVATION_MONITOR.exit
   55          return gem_original_require(path)
   56        ensure
=> 57          RUBYGEMS_ACTIVATION_MONITOR.enter
   58        end
   59      end
   60  
   61      # If +path+ is for a gem that has already been loaded, don't
(rdb:1) var local
  found_specs => nil
  le => nil
  load_error => nil
  names => nil
  path => "debug"
  spec => nil
  valid => nil
(rdb:1) 

While debug_test.rb does not require any gems, considering the mention of rubygems I thought my rvm gemset might be causing the problems. To this end I tried repeating the procedure with newly created (empty) gemset, but the problem persists. After this I tried running with a different version of ruby (1.9.3), where again the error persists. Interestingly it seems that for 1.9.3 the file does not exist:

/home/henry/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:57:
(rdb:1) list
[52, 61] in /home/henry/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb
No sourcefile available for /home/henry/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb

Any help is much appreciated!

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.