对于问题的长度,我深表歉意,但我想明确表示我没有犯任何愚蠢的错误!
因此,我正在努力使用 Ruby 1.9.3 在 RubyMine 4.5 中进行调试,我的步骤如下:
Ruby 1.9.3、Ruby Gems、DevKit 和 Rails(遵循本指南)的全新(即删除了所有以前的 ruby 和 gem 目录)安装 - 效果很好。
然后我尝试开始使用我团队的 ruby 代码。我在 RubyMine 中打开目录(记住首先要删除.idea
目录)并提示bundle install
我运行(从控制台)按要求运行。这成功完成。重新启动 RubyMine。
然后我确保 Ruby 正在工作:工具 > IRB 控制台 > puts "test"
#test => nil
- 工作我现在尝试调试器 ( SHIFT
+ F9
) 并查看消息:
The gem ruby-debug-base19x required by the debugger is currently not installed. Would you like to install it?"
我单击取消并检查我的 Gemfile,目前与调试相关的唯一文件是:
# Debugging
gem 'debugger'
#gem 'ruby-debug-base19', :require => false
#gem 'ruby-debug19', :require => false
gem 'ruby-prof', :require => false #, :git => 'git://github.com/wycats/ruby-prof.git'
看起来我们有调试器支持ruby-debug
. 但是,在这里阅读似乎debugger
还不够。我需要安装ruby-debug-base19x
. 所以,在SO之后,我从 Gemfile 中注释掉调试器并运行
gem install ruby-debug-base19x --pre
gem install ruby-debug-ide --pre
哪个运行良好,所以我添加
gem 'ruby-debug-base19x', '0.11.30.pre10'
gem 'ruby-debug-ide', '0.4.17.beta14'
到我的 Gemfile,然后bundle install
从控制台运行。
最后,我在 RubyMine (SHIFT + F9) 中打开调试器。并puts "test" #test => nil
再次工作。所以我尝试双击我的脚本的排水沟来创建一个断点,RubyMine 暂停了一秒钟,然后我得到:
D:\Ruby\Ruby193\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.17.beta14/bin/rdebug-ide --dispatcher-port 55451 --port 55452 -- S:/code/account_groups/script/rails console
Fast Debugger (ruby-debug-ide 0.4.17.beta14, ruby-debug-base 0.11.30.pre10) listens on 127.0.0.1:55452
D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/debugger-1.1.4/lib/ruby_debug.so: warning: already initialized constant VERSION
5992: Exception in DebugThread loop: undefined method `errmsg' for #<Debugger::ControlState:0x2a2f3e8>
Backtrace:
D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/debugger-1.1.4/lib/ruby-debug/command.rb:160:in `errmsg'
from: D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/debugger-1.1.4/lib/ruby-debug/commands/breakpoints.rb:81:in `execute'
from: D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.17.beta14/lib/ruby-debug-ide/ide_processor.rb:89:in `block in process_commands'
from: D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.17.beta14/lib/ruby-debug-ide/ide_processor.rb:86:in `catch'
from: D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.17.beta14/lib/ruby-debug-ide/ide_processor.rb:86:in `process_commands'
from: D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.17.beta14/lib/ruby-debug-ide.rb:160:in `block in start_control'
Process finished with exit code 0
我还尝试使用代码的备份副本并遵循相同的步骤,尝试加载调试器时也出现以下错误:
Uncaught exception: cannot load such file -- ruby-debug
D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `block in require'
D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
S:/code/account_groups_so/lib/systematic-online/r_spec_runner.rb:5:in `<top (required)>'
D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `block in require'
D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
S:/code/account_groups_so/config/environment.rb:12:in `block in <top (required)>'
S:/code/account_groups_so/config/environment.rb:12:in `each'
S:/code/account_groups_so/config/environment.rb:12:in `<top (required)>'
D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `block in require'
D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.6/lib/rails/application.rb:103:in `require_environment!'
D:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.6/lib/rails/commands.rb:40:in `<top (required)>'
S:/code/account_groups_so/script/rails:6:in `require'
S:/code/account_groups_so/script/rails:6:in `<top (required)>'
脚本没有任何问题(我以前用过很好),并且跟踪似乎与ruby-debug-ide
- 发生了什么事?
感谢您的帮助 - 这让我发疯!