While working through the expertly written "The Ruby on Rails Tutorial" by Michael Hartl, I ran into a small configuration issue. The issue I experienced was with Guard not properly starting a Spork server from the command line. My system was able to run Rspec, Spork, and Guard with no errors as long as Guard didn't try to load Spork. Here is what my terminal output looks like.
I'm positive that others have experienced this same error. The hint for the fix comes from the lines 15:28:49 - INFO - Starting Spork for RSpec, Test::Unit. Couldn't find a supported test framework that begins with 'testunit'
. This means that Guard was attempting to run tests using the testunit framework (which was not installed). To fix this add :test_unit => false
to your Guardfile's Spork block. It should look something like this.
Additional Issues
For troubleshooting surrounding Guard and Spork, take a look at the github page for guard-spork. Here are a couple of the most basic things you can check.
- If you can start Spork manually but get the following error message when using Guard::Spork:
- Starting Spork for RSpec ERROR: Could not start Spork for RSpec/Cucumber. Make sure you can use it manually first.
- Try to increase the value of the :wait => 60 option before any further investigation. It's possible that this error is the result of an unnecessary /test directory in the root of your application. Removing the /test directory entirely may resolve this error.
Join the conversation