Open petRUShka opened 13 years ago
Yup, this is a problem - by some reason the debugger doesn't work with Bundler. I can repeat that.
Have you plans about fixing this issue?
For sure, when I have some free time. :)
Doesn't Rspec 2 require the debug flag?
'bundle exec rspec spec/models/user_spec.rb --debugger'
Hmm, I don't know, but RSpec 2 works just perfectly if it is called without 'bundle exec'.
I hope I'll have a chance to take a look at the issue during this weekend.
The problem with 'bundle exec' - it uses Kernel.exec run running the ruby script. I.e.
bundle exec rspec spec/models/user_spec.rb
will actually run
Kernel.exec(["rspec", "spec/models/user_spec.rb"])
Kernel.exec replaces the current process by running the rspec command, so it is not in the debugger's scope anymore. So, for now I even don't know how to make vim-ruby-debugger work with 'bundle exec'...
As a workaround, you can run rspec directly from vendor/bundle (I guess you store gems there, right?). I.e.:
:let g:ruby_debugger_spec_path='vendor/bundle/ruby/1.9.1/gems/rspec-core-2.6.4/bin/rspec'
:RdbTest
Hope that will help.
Thanks! I will try this. But because of bundle influence on Rails world it will be a trouble :(
I opened _spec.rb file in VIM and then called
:RdbTest
. I got such output:ok. I tried to call
Rdebugger 'bundle exec rspec spec/models/user_spec.rb'
. It run ok, but didn't stop on breakpoints in user_spec.rb and user.rb. I have full rspec output in:RdbLog