title: Unable to debug in RubyMine 4.5 using Ruby 1.9.3
body: <p>My apologies for the length of the question, but I want to make it clear I am not making any stupid mistakes!</p>
  
  <p>So, I am struggling to get debugging working in RubyMine 4.5 using Ruby 1.9.3, my steps are as follows:</p>
  
  <p>Fresh (i.e. having removed all previous ruby and gem directories) install of Ruby 1.9.3, Ruby Gems, DevKit and Rails (following <a href="http://thirdeye.ibtgames.com/2011/11/installing-ruby-on-rails-on-win7/" rel="nofollow noreferrer">this guide</a>) - that works fine.</p>
  
  <p>I then try to begin working with my team's ruby code. I open up the directory in RubyMine (remembering first to delete the <code>.idea</code> directory) and am prompted to run <code>bundle install</code> which I do (from console) as requested. This completes successfully. Restart RubyMine.</p>
  
  <p>I then ensure Ruby is working: Tools > IRB Console > <code>puts "test"</code> <code>#test =&gt; nil</code> - Works
  I now try the debugger (<code>SHIFT</code> + <code>F9</code>) and see the message:</p>
  
  <p><code>The gem ruby-debug-base19x required by the debugger is currently not installed. Would you like to install it?"</code></p>
  
  <p>I click cancel and check my Gemfile, the only ones related to debugging present are:</p>
  
  <pre><code># Debugging
  gem 'debugger'
  #gem 'ruby-debug-base19', :require =&gt; false
  #gem 'ruby-debug19', :require =&gt; false
  gem 'ruby-prof', :require =&gt; false #, :git =&gt; 'git://github.com/wycats/ruby-prof.git'
  </code></pre>
  
  <p>Looks like we have debugger in favour of <code>ruby-debug</code>. Reading <a href="http://devnet.jetbrains.net/message/5459214?tstart=0" rel="nofollow noreferrer">here</a>, however, it seems <code>debugger</code> is not sufficient. I need to install <code>ruby-debug-base19x</code>. So, following <a href="https://stackoverflow.com/questions/10323119/cannot-load-such-file-script-rails-getting-this-error-while-remote-debuggin">SO</a>, I comment out debugger from Gemfile and run</p>
  
  <pre><code>gem install ruby-debug-base19x --pre
  gem install ruby-debug-ide --pre
  </code></pre>
  
  <p>Which run fine, so I add </p>
  
  <pre><code>gem 'ruby-debug-base19x', '0.11.30.pre10'
  gem 'ruby-debug-ide', '0.4.17.beta14'
  </code></pre>
  
  <p>to my Gemfile, and run a <code>bundle install</code> from the console.</p>
  
  <p>Finally, i open the debugger inside RubyMine (SHIFT + F9). And <code>puts "test" #test =&gt; nil</code> works again. So i try double clicking in the gutter of my script to create a breakpoint, RubyMine pauses for a second and then i get:</p>
  
  <pre><code>D:\Ruby\Ruby193\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.17.beta14/bin/rdebug-ide --dispatcher-port 55451 --port 55452 -- S:/code/account_groups/script/rails console
  Fast Debugger (ruby-debug-ide 0.4.17.beta14, ruby-debug-base 0.11.30.pre10) listens on 127.0.0.1:55452
  D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/debugger-1.1.4/lib/ruby_debug.so: warning: already initialized constant VERSION
  5992: Exception in DebugThread loop: undefined method `errmsg' for #&lt;Debugger::ControlState:0x2a2f3e8&gt;
  Backtrace:
  D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/debugger-1.1.4/lib/ruby-debug/command.rb:160:in `errmsg'
    from: D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/debugger-1.1.4/lib/ruby-debug/commands/breakpoints.rb:81:in `execute'
    from: D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.17.beta14/lib/ruby-debug-ide/ide_processor.rb:89:in `block in process_commands'
    from: D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.17.beta14/lib/ruby-debug-ide/ide_processor.rb:86:in `catch'
    from: D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.17.beta14/lib/ruby-debug-ide/ide_processor.rb:86:in `process_commands'
    from: D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.17.beta14/lib/ruby-debug-ide.rb:160:in `block in start_control'
  
  Process finished with exit code 0
  </code></pre>
  
  <p>I have also tried using a backup copy of the code and following the same steps, i also get the following error when trying to load up the debugger:</p>
  
  <pre><code>Uncaught exception: cannot load such file -- ruby-debug
      D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
      D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `block in require'
      D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
      D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
      S:/code/account_groups_so/lib/systematic-online/r_spec_runner.rb:5:in `&lt;top (required)&gt;'
      D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
      D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `block in require'
      D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
      D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
      S:/code/account_groups_so/config/environment.rb:12:in `block in &lt;top (required)&gt;'
      S:/code/account_groups_so/config/environment.rb:12:in `each'
      S:/code/account_groups_so/config/environment.rb:12:in `&lt;top (required)&gt;'
      D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
      D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `block in require'
      D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
      D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
      D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.6/lib/rails/application.rb:103:in `require_environment!'
      D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.6/lib/rails/commands.rb:40:in `&lt;top (required)&gt;'
      S:/code/account_groups_so/script/rails:6:in `require'
      S:/code/account_groups_so/script/rails:6:in `&lt;top (required)&gt;'
  </code></pre>
  
  <p>There is nothing wrong with the script (i have used it fine before) and the trace seems related to <code>ruby-debug-ide</code> - what's going on?</p>
  
  <p>Thanks for any help - this is driving me mad!</p>