Cannot start debugger

Hello community,

after upgrading to RubyMine 4.0.1 I cannot start my application in debug mode:

"Error running Development [...] Cannot start debugger. Gem 'ruby-debug-ide' isn't installed or its executable script 'rdebug-ide' doesn't exist."

I'm using Ubuntu 10.04. Here is what gem env says (almost the same as in RubyMine Tools -> Show Gem Environment):

RubyGems Environment:
  - RUBYGEMS VERSION: 1.5.1
  - RUBY VERSION: 1.8.7 (2011-04-12 patchlevel 330) [java]
  - INSTALLATION DIRECTORY: /opt/jruby-1.6.1/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: /opt/jruby-1.6.1/bin/jruby
  - EXECUTABLE DIRECTORY: /opt/jruby-1.6.1/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-java-1.6
  - GEM PATHS:
     - /opt/jruby-1.6.1/lib/ruby/gems/1.8
     - /home/stefmiet/.gem/jruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - "install" => "--no-rdoc --no-ri --env-shebang"
     - "update" => "--no-rdoc --no-ri --env-shebang"
  - REMOTE SOURCES:
     - http://rubygems.org/


I have ruby-debug-ide installed: gem list -d ruby-debug-ide:

*** LOCAL GEMS ***

ruby-debug-ide (0.4.16)
    Author: Markus Barchfeld, Martin Krauskopf, Mark Moseley, JetBrains
    RubyMine Team
    Rubyforge: http://rubyforge.org/projects/debug-commons
    Homepage: http://rubyforge.org/projects/debug-commons/
    Installed at: /opt/jruby-1.6.1/lib/ruby/gems/1.8

    IDE interface for ruby-debug.


I also see the executable script in the following path:

/opt/jruby-1.6.1/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.16/bin/rdebug-ide


So I do not know where RubyMine is searching the gem and it's executable ... everything seems to be correctly installed. Any advice?

12 comments
Comment actions Permalink

Hello Stefan,

please try updating to the latest ruby-debug-ide version by running
gem install ruby-debug-ide --pre

0
Comment actions Permalink

Hi Dennis,

I did the update:

Building native extensions.  This could take a while...
Successfully installed ruby-debug-ide-0.4.17.beta8
1 gem installed

But unfortunately RubyMine 4.0.1 is still not debugging. If I start the old version of RubyMine 3.2.4 it is still okay. Also with the updated gem:

Fast Debugger (ruby-debug-ide 0.4.17.beta8, ruby-debug-base 0.10.3.2) listens on 127.0.0.1:37740
=> Booting WEBrick
=> Rails 3.0.7 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-03-02 12:58:55] INFO  WEBrick 1.3.1
[2012-03-02 12:58:55] INFO  ruby 1.8.7 (2011-04-12) [java]
[2012-03-02 12:59:00] INFO  WEBrick::HTTPServer#start: pid=6783 port=3000


I imported all settings from the old installation ... what could be the difference?

0
Comment actions Permalink

Oh, it seems that latest ruby-debug-base gem requires linecache gem and it's presence is incorrectly checked for all versions. You can install linecache gem and debug should work fine

0
Comment actions Permalink

Great job, Dennis. Now it works! :)

But I would be interested in how you figured it out? I did't see any hint in this direction ...

0
Comment actions Permalink

I am seeing this problem with RubyMine 8. I attempted to install the linecache gem, but got errors .

lvachon$ gem install linecache
Fetching: linecache-1.3.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing linecache:
ERROR: Failed to build gem native extension.

current directory: /Users/lvachon/.rvm/rubies/ruby-2.1.6/lib/ruby/gems/2.1.0/gems/linecache-1.3.1/ext/linecache
/Users/lvachon/.rvm/rubies/ruby-2.1.6/bin/ruby -r ./siteconf20160225-899-1h5axoo.rb extconf.rb
Can't handle 1.9.x yet
*** 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/lvachon/.rvm/rubies/ruby-2.1.6/bin/ruby

extconf failed, exit code 1

Gem files will remain installed in /Users/lvachon/.rvm/rubies/ruby-2.1.6/lib/ruby/gems/2.1.0/gems/linecache-1.3.1 for inspection.
Results logged to /Users/lvachon/.rvm/rubies/ruby-2.1.6/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/linecache-1.3.1/gem_make.out

0
Comment actions Permalink

@Laura, what problem are you experiencing? You don't need to install line cache gem for 2+

0
Comment actions Permalink

Please try doing:

gem install ruby-debug-ide --pre

0
Comment actions Permalink

gem installs without error. still getting the same Error message when attempting to run the debugger

0
Comment actions Permalink

Laura, could you please specify what you're debugging (a screenshot of Run configuration would be also great)

0
Comment actions Permalink

I fixed this problem by removing all my gems. removing ruby. cleaning up directories and rvm. removing ruby mine, then reinstalling everything. Was a pain, but it worked.

0
Comment actions Permalink

Having the same issue as Laura. Can't install the `ruby-debug-ide` gem isn't installed or its executable script does not exist.
I have the latest version of RubyMine (I just installed it). So what's the suggested approach to solving this issue? 

0

Please sign in to leave a comment.