0

我有 RubyMine 版本 4.0.1,我将 Ruby 升级到 2.0.0。

尝试调试(开发或测试)时,我收到以下消息:

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

单击“是”后,我收到此错误:

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

我读了这篇文章 - http://blog.jetbrains.com/ruby/2013/01/rubymine-enoki-eap-enjoy-ruby-2-0-apps-debugging/ 并尝试了 5.4 但同样的问题发生了。

4

1 回答 1

4

请更新到 RubyMine 5.4.2,它将安装正确的调试 gem 版本。

RubyMine 5.x 之前的版本不支持 Ruby 2.0 调试。

5.x 版本为 Ruby 2.0 安装以下 gem:

ruby-debug-ide (0.4.17)

请注意,在使用 Ruby 2.0 时,RubyMine 5 不需要并且不安装linecache和gems。ruby-debug-base

如果ruby-debug-ide由于某种原因 gem 没有从 RubyMine 安装,请尝试从终端安装它:

gem install ruby-debug-ide
于 2013-06-19T10:17:29.303 回答