Can't debug rspec or selenium tests?


When I try to start up my debugger in IDEA, I get this error:

Cannot connect to the debugged process at port 56538 in 10s:

Error Output:
~/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems.rb:777:in `report_activate_error': Could not find RubyGem rake (>= 0.8.1) (Gem::LoadError)
    from ~/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems.rb:211:in `activate'
    from ~/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems.rb:246:in `activate'
    from ~/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems.rb:245:in `each'
    from ~.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems.rb:245:in `activate'
    from ~/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems.rb:1056:in `gem'
    from ~/.rvm/gems/ruby-1.8.7-p249/bin/rdebug-ide:18
    from -e:1:in `load'
    from -e:1

I can run all of my tests on the command line, i.e. rake spec and rake test:selenium work fine.  I can also run my tests in IDEA -- it's just that when I try to debug, I see the error.  

I have ruby-debug-ide and ruby-debug installed.

When I run "which rake", I get:


I went to project settings, and my gems bin directory points to: ~/.rvm/gems/ruby-1.8.7-p249/bin

I tried adding ~/.rvm/gems/ruby-1.8.7-p249%global/bin to my classpath, but that didn't work either.

thanks in advance,

Please sign in to leave a comment.