通过 RubyMine IDE 进行远程调试时出现以下错误。
$ bundle exec rdebug-ide --port 1234 -- script/rails server
Fast Debugger (ruby-debug-ide 0.4.9) listens on :1234
/home/amit/.rvm/gems/ruby-1.9.3-p125/gems/ruby-debug-ide19-0.4.12/lib/ruby-debug-ide.rb:123:in `debug_load'
/home/amit/.rvm/gems/ruby-1.9.3-p125/gems/ruby-debug-ide19-0.4.12/lib/ruby-debug-ide.rb:123:in `debug_program'
/home/amit/.rvm/gems/ruby-1.9.3-p125/gems/ruby-debug-ide19-0.4.12/bin/rdebug-ide:87:in `<top (required)>'
/home/amit/.rvm/gems/ruby-1.9.3-p125/bin/rdebug-ide:19:in `load'
/home/amit/.rvm/gems/ruby-1.9.3-p125/bin/rdebug-ide:19:in `<main>'
Uncaught exception: cannot load such file -- script/rails
我按照此链接安装了远程调试所需的 gem。
这是用于远程调试的 Gemfile 配置
#To Debug
gem 'linecache19', '0.5.13', :path => "~/.rvm/gems/ruby-1.9.3-p125/gems/linecache19-0.5.13/"
gem 'ruby-debug-base19', '0.11.26', :path => "~/.rvm/gems/ruby-1.9.3-p125/gems/ruby-debug-base19-0.11.26/"
gem 'ruby-debug19', :require => 'ruby-debug'
gem 'ruby-debug-ide19'
该应用程序使用Ruby 1.9.3和Rails 3.0.11运行。