Recently, I was re-setting up my Ruby on Rails development environment to use Guard and Spork on my new MacBook Pro and ran into a bit of problem. Upon starting up Guard using “bundle exec guard”, the specs would be run without error. However, I noticed that, when changing a model or its corresponding spec file, Guard would attempt to run the tests again but, in this case, I would see an error in terminal window as follows:

/usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/drb/drb.rb:736:in `rescue in block in open’: druby:// – # (DRb::DRbConnError)
from /usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/drb/drb.rb:730:in `block in open’
from /usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/drb/drb.rb:729:in `each’
from /usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/drb/drb.rb:729:in `open’
from /usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/drb/drb.rb:1191:in `initialize’
from /usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/drb/drb.rb:1171:in `new’
from /usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/drb/drb.rb:1171:in `open’
from /usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/drb/drb.rb:1087:in `block in method_missing’
from /usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/drb/drb.rb:1105:in `with_friend’
from /usr/local/rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/drb/drb.rb:1086:in `method_missing’
from /usr/local/rvm/gems/ruby-1.9.2-p318@anaf/gems/spork-minitest-0.0.3/bin/testdrb:5:in `
from /usr/local/rvm/gems/ruby-1.9.2-p318@anaf/bin/testdrb:19:in `load’
from /usr/local/rvm/gems/ruby-1.9.2-p318@anaf/bin/testdrb:19:in `

After a few false starts, I found the solution was to modify the .rspec file and simply remove the following line: “–drb”.

So, if you see this sort of a stack trace in your terminal window, you now have something to try!