我对RubyMine变得非常沮丧,因为让调试器运行是不可接受的。我在我的gemfile中有这个,
gem 'ruby-debug-ide' if ENV["RM_INFO"]
gem 'ruby-debug-base19x', '0.11.30.pre12' if ENV["RM_INFO"]
(请注意,我不列出了debugger
gem),bundle install
部分地给了我
Using debugger-ruby_core_source (1.2.2)
Using ruby-debug-base19x (0.11.30.pre12)
Using ruby-debug-ide (0.4.16)
,这在Gemfile.lock
ruby-debug-base19x (0.11.30.pre12)
debugger-ruby_core_source (>= 1.1.4)
rake (>= 0.8.1)
ruby-debug-ide (0.4.16)
rake (>= 0.8.1)
同样,debugger
宝石无处可寻。那么,当我尝试调试我的Rails应用程序时,为什么还能得到它呢?
Exception: undefined method `prepare_debugger' for Debugger:Module
/Users/cbmanica/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug-ide-0.4.17.beta17/lib/ruby-debug-ide/multiprocess/pre_child.rb:60:in `start_debugger'
/Users/cbmanica/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug-ide-0.4.17.beta17/lib/ruby-debug-ide/multiprocess/pre_child.rb:32:in `block in pre_child'
/Users/cbmanica/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug-ide-0.4.17.beta17/lib/ruby-debug-ide/multiprocess/pre_child.rb:26:in `times'
/Users/cbmanica/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug-ide-0.4.17.beta17/lib/ruby-debug-ide/multiprocess/pre_child.rb:26:in `pre_child'
/Users/cbmanica/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug-ide-0.4.17.beta17/lib/ruby-debug-ide/multiprocess/starter.rb:9:in `<top (required)>'
答案 0 :(得分:1)
确保您的Gemfile
包含此内容:
gem 'linecache19', '>= 0.5.13', :git => 'https://github.com/robmathews/linecache19-0.5.13.git'
gem 'ruby-debug-base19x', '>= 0.11.30.pre12'
gem 'ruby-debug-ide', '>= 0.4.17.beta17'
如my other answer所述,宝石的预发布版本是必需的。