Search code examples
ubunturubygemsrubymine

Debug mode on my RubyMine version 4.0.1 stopped working after upgrade ruby version to 2.0.0


I have RubyMine version 4.0.1 and I upgraded Ruby to 2.0.0.

When trying to debug (either development or tests) I get this message:

The gem ruby-debug-base required by the debugger is not currently installed. Would you like to install it?

After clicking "Yes" I get this error:

Error running Development: air: Failed to Install Gems. Following gems were not installed: linecache (0.46): Error installing linecache: ERROR: Failed to build gem native extension. /home/yehuda/.rvm/rubies/ruby-2.0.0-p195/bin/ruby 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=/home/yehuda/.rvm/rubies/ruby-2.0.0-p195/bin/ruby Gem files will remain installed in /home/yehuda/.rvm/gems/ruby-2.0.0-p195@global/gems/linecache-0.46 for inspection. Results logged to /home/yehuda/.rvm/gems/ruby-2.0.0-p195@global/gems/linecache-0.46/ext/gem_make.out /home/yehuda/Downloads/RubyMine-4.0.1/rb/gems/ruby-debug-base-0.10.5.jb2.gem: Error installing ruby-debug-base-0.10.5.jb2.gem: ERROR: Failed to build gem native extension. /home/yehuda/.rvm/rubies/ruby-2.0.0-p195/bin/ruby 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=/home/yehuda/.rvm/rubies/ruby-2.0.0-p195/bin/ruby Gem files will remain installed in /home/yehuda/.rvm/gems/ruby-2.0.0-p195@global/gems/linecache-0.46 for inspection. Results logged to /home/yehuda/.rvm/gems/ruby-2.0.0-p195@global/gems/linecache-0.46/ext/gem_make.out

I read this article - http://blog.jetbrains.com/ruby/2013/01/rubymine-enoki-eap-enjoy-ruby-2-0-apps-debugging/ and tried the 5.4 but the same problem happened.


Solution

  • Please update to RubyMine 5.4.2, it will install the correct debug gem version.

    RubyMine versions before 5.x do not support Ruby 2.0 debugging.

    5.x versions install the following gem for Ruby 2.0:

    ruby-debug-ide (0.4.17)
    

    Note that linecache and ruby-debug-base gems are not needed and are not installed by RubyMine 5 when using Ruby 2.0.

    If ruby-debug-ide gem doesn't install from RubyMine for some reason, please try installing it from the terminal:

    gem install ruby-debug-ide