Rails无法调试

时间:2014-10-03 21:57:37

标签: ruby-on-rails debugging rubygems rvm rubymine

我一直在弄乱这个问题很长一段时间没有任何成功。我只想调试应用程序是RubyMine或Aptana。每当我尝试在调试模式下运行应用程序时,我都会遇到以下异常

"/home/bsikander/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:126:in `require': cannot load such file -- debase (LoadError)
    from /home/bsikander/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:126:in `require'
    from /home/bsikander/.rvm/gems/ruby-2.0.0-p576/gems/ruby-debug-ide-0.4.23.beta1/lib/ruby-debug-ide.rb:8:in `<top (required)>'
    from /home/bsikander/.rvm/gems/ruby-2.0.0-p576/gems/ruby-debug-ide-0.4.23.beta1/bin/rdebug-ide:8:in `require_relative'
    from /home/bsikander/.rvm/gems/ruby-2.0.0-p576/gems/ruby-debug-ide-0.4.23.beta1/bin/rdebug-ide:8:in `<top (required)>'
    from /home/bsikander/.rvm/gems/ruby-2.0.0-p576/bin/rdebug-ide:23:in `load'
    from /home/bsikander/.rvm/gems/ruby-2.0.0-p576/bin/rdebug-ide:23:in `<main>'"

我在互联网上搜索了这个并试图安装debase gem,但我得到了以下的说明

Building native extensions.  This could take a while...
ERROR:  Error installing debase:
    ERROR: Failed to build gem native extension.

    /home/bsikander/.rvm/rubies/ruby-2.0.0-p576/bin/ruby extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
Makefile creation failed
**************************************************************************
No source for ruby-2.0.0-p576 provided with debugger-ruby_core_source gem.
**************************************************************************
*** 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.

我还安装了gem“debugger-ruby_core_source”,但仍然无法安装debase或调试应用程序。请帮助我或指出正确的方向。

我的Ruby版本是2.0.0。

2 个答案:

答案 0 :(得分:0)

我有使用RubyMine和Aptana的类似经历;我建议您查看byebugpry作为基于宝石的ruby调试工具,根据我的经验,这些工具易于使用且易于运行。

我推荐byebug更高,因为pry不是专为调试而设计的,并且byebug的next命令有时是天赐之物。

答案 1 :(得分:0)

最近我已经从rvm切换到了chruby,我有同样的问题,在环顾四周并阅读rubymine的错误消息和我尝试安装ruby-debug-ide之后的东西,并且它以某种方式工作,所以是的< / p>

gem install ruby-debug-ide

会做到这一点。