Search code examples
ruby-on-railsruby-on-rails-3rspecsporkguard

Rails, Spork and debugger


I use spork with Guard + Rspec but the debugger doesn't work as expected:

  • I added require 'spork/ext/ruby-debug' just after the require 'spork'

  • it properly stops on debugger breakpoints...

  • ... but I can't access irb, it spits: Command is available only in local mode.

Do you know how to get around this?

Thanks,


PS: of course I read this question but it's a bit outdated and doesn't work.

PS2: I'd like to avoid using this.

PS3: : I also posted this as an issue here.


Solution

  • Consider using pry, it is so much more awesome. I include it in my spec_helper file (works with Test::Unit too) and can do binding.pry within my tests to essentially pry into objects. Works fine with Guard/Spork/RSpec/Cucumber/Spinach for me.

    Pry has long since replaced IRB as my default REPL.