1

I'm becoming extremely frustrated with RubyMine, because getting the debugger to run is unacceptably difficult. I've got this in my gemfile,

gem 'ruby-debug-ide' if ENV["RM_INFO"]
gem 'ruby-debug-base19x', '0.11.30.pre12' if ENV["RM_INFO"]

(note that I do not have the debugger gem listed), and bundle install gives me, in part,

Using debugger-ruby_core_source (1.2.2) 
Using ruby-debug-base19x (0.11.30.pre12) 
Using ruby-debug-ide (0.4.16) 

and this in Gemfile.lock

ruby-debug-base19x (0.11.30.pre12)
  debugger-ruby_core_source (>= 1.1.4)
  rake (>= 0.8.1)
ruby-debug-ide (0.4.16)
  rake (>= 0.8.1)

Again, the debugger gem is nowhere to be found. So why do I still get this when I try to debug my Rails application?

Exception: undefined method `prepare_debugger' for Debugger:Module
  /Users/cbmanica/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug-ide-0.4.17.beta17/lib/ruby-debug-ide/multiprocess/pre_child.rb:60:in `start_debugger'
  /Users/cbmanica/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug-ide-0.4.17.beta17/lib/ruby-debug-ide/multiprocess/pre_child.rb:32:in `block in pre_child'
  /Users/cbmanica/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug-ide-0.4.17.beta17/lib/ruby-debug-ide/multiprocess/pre_child.rb:26:in `times'
  /Users/cbmanica/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug-ide-0.4.17.beta17/lib/ruby-debug-ide/multiprocess/pre_child.rb:26:in `pre_child'
  /Users/cbmanica/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug-ide-0.4.17.beta17/lib/ruby-debug-ide/multiprocess/starter.rb:9:in `<top (required)>'
cbmanica
  • 3,502
  • 7
  • 36
  • 54
  • I should add I've been over the other SO answers many times - which should be a clue to the JetBrains people that this process is unacceptable for a paid product. – cbmanica May 24 '13 at 18:29
  • 1
    Why do you have 0.4.16 gem listed in Gemfile, but 0.4.17 appears in the trace? Something is screwed up in your Ruby and gems installation. The process of getting a working debugger in RubyMine for 99% of the users is just pressing the Debug button, required gems are bundled and installed automatically. In some rare cases manual installation is required as described in [this answer](http://stackoverflow.com/a/10325110/104891). It usually solves the problem for the rest of the users. If something is badly broken on your system, try a fresh Ruby install via RVM. – CrazyCoder May 24 '13 at 18:37
  • Turns out that's right - apparently RubyMine requires a beta version of `ruby-debug-ide` to work, and I must have disrupted the delicate balance of gem versions when trying to reinstall gems after a bundler error. I would disagree that 99% of users are immune from this process, but I do envy those lucky enough for it to "just work" the way that it should. In any case, thanks... – cbmanica May 24 '13 at 19:08

1 Answers1

1

Ensure your Gemfile contains this:

gem 'linecache19', '>= 0.5.13', :git => 'https://github.com/robmathews/linecache19-0.5.13.git'
gem 'ruby-debug-base19x', '>= 0.11.30.pre12'
gem 'ruby-debug-ide', '>= 0.4.17.beta17'

As described in my other answer the pre-release versions of the gems are required.

Community
  • 1
  • 1
CrazyCoder
  • 389,263
  • 172
  • 990
  • 904