无法使用RVM,Ruby 1.9.2和Rails 3运行RubyMine调试器 [英] Can't run RubyMine debugger with RVM, Ruby 1.9.2 and Rails 3

查看:140
本文介绍了无法使用RVM,Ruby 1.9.2和Rails 3运行RubyMine调试器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了一个新的Ubuntu安装,并遵循本指南安装RVM,Ruby 1.9.2和Rails 3。

I've setup a fresh Ubuntu install and followed this guide to install RVM, Ruby 1.9.2 and Rails 3.

然后我安装了RubyMine 3.0,它从RVM路径自动检测到Ruby 1.9.2 SDK,所以没关系。我可以完美地启动服务器(绿色播放按钮)。

Then I installed RubyMine 3.0, it automatically detected the Ruby 1.9.2 SDK from the RVM path, so that's ok. I can start the server perfectly (green play button).

现在问题是我无法调试,因为它在启动后会引发以下异常。

Now the problem is I can't debug it because it throws the following exception after startup.

/home/eparizzi/.rvm/rubies/ruby-1.9.2-p180/bin/ruby -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /home/eparizzi/.rvm/gems/ruby-1.9.2-p180/gems/ruby-debug-ide-0.4.16/bin/rdebug-ide --port 39879 -- /home/eparizzi/Projects/Delko/src/script/rails server -p 3000 -b 0.0.0.0 -e development
Fast Debugger (ruby-debug-ide 0.4.16, ruby-debug-base 0.11) listens on 127.0.0.1:39879
    /home/eparizzi/.rvm/gems/ruby-1.9.2-p180/gems/ruby-debug19-0.11.6/cli/ruby-debug/interface.rb:128:in `<module:Debugger>'
    /home/eparizzi/.rvm/gems/ruby-1.9.2-p180/gems/ruby-debug19-0.11.6/cli/ruby-debug/interface.rb:1:in `<top (required)>'
    /home/eparizzi/.rvm/gems/ruby-1.9.2-p180/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:1:in `require_relative'
    /home/eparizzi/.rvm/gems/ruby-1.9.2-p180/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:1:in `<top (required)>'
    /home/eparizzi/.rvm/gems/ruby-1.9.2-p180/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:6:in `require_relative'
    /home/eparizzi/.rvm/gems/ruby-1.9.2-p180/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:6:in `<top (required)>'
    /home/eparizzi/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/runtime.rb:68:in `require'
    /home/eparizzi/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
    /home/eparizzi/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:in `each'
    /home/eparizzi/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:in `block in require'
    /home/eparizzi/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:in `each'
    /home/eparizzi/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:in `require'
    /home/eparizzi/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler.rb:120:in `require'
    /home/eparizzi/Projects/Delko/src/config/application.rb:7:in `<top (required)>'
    /home/eparizzi/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/commands.rb:28:in `require'
    /home/eparizzi/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/commands.rb:28:in `block in <top (required)>'
    /home/eparizzi/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/commands.rb:27:in `tap'
    /home/eparizzi/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/commands.rb:27:in `<top (required)>'
    /home/eparizzi/Projects/Delko/src/script/rails:6:in `require'
    /home/eparizzi/Projects/Delko/src/script/rails:6:in `<top (required)>'
    /home/eparizzi/.rvm/gems/ruby-1.9.2-p180/gems/ruby-debug-ide-0.4.16/lib/ruby-debug-ide.rb:112:in `debug_load'
    /home/eparizzi/.rvm/gems/ruby-1.9.2-p180/gems/ruby-debug-ide-0.4.16/lib/ruby-debug-ide.rb:112:in `debug_program'
    /home/eparizzi/.rvm/gems/ruby-1.9.2-p180/gems/ruby-debug-ide-0.4.16/bin/rdebug-ide:87:in `<top (required)>'
    -e:1:in `load'
    -e:1:in `<main>'
Uncaught exception: superclass mismatch for class RemoteInterface

Process finished with exit code 0

我有.Gemfile中的以下行

I have the following line in the .Gemfile

gem 'ruby-debug19', :require => 'ruby-debug'

另外(在某些博客之后)我安装了ruby-debug-ide gem如下:

Also (following some blog) I installed the ruby-debug-ide gem as follows:

gem install ruby-debug-ide19 -- --with-ruby-include=$rvm_path/src/ruby-1.9.2-p180/ 


推荐答案

调试问题。你不应该在.gemfile中包含debug gem。番茄红素应该自动接收,所以我从那里删除它开始。

it's definitely a gem related debug issue. You shouldn't need to include the debug gem in your .gemfile though. Rubymine should pick it up automatically, so I'd remove it from there to start with.

确保您已经安装1.9的调试基础宝石

Make sure you've installed the debug-base gem as well for 1.9

gem install ruby-debug-base19

我记得有几个与调试开始时一般为1.9,但我认为现在已经被淘汰了。

I remember there was a couple of issues related to debugging in general for 1.9 at the start but I think they've been ironed out now.

你看过这篇文章了吗?它也可以帮助您指出方向。

Have you seen this article yet? It also might be able to help point you in a direction.

在ruby中调试1.9

最好的。

这篇关于无法使用RVM,Ruby 1.9.2和Rails 3运行RubyMine调试器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆