Zeus will show that it’s running and show green statuses when it’s done loading.

After that, simply run the Zeus commands listed above!

Note: Since RSpec support files and FactoryGirl factories are preloaded, Zeus will need to be restarted to utilize changes to those file types. To restart, ctrl+c to stop Zeus and then run zeus start.

Zeus creates a .zeus.sock file you should add to your .gitignore_global file so that you don’t commit it.

Fixes

So I ran into a few problems using Zeus, many of which were documented in the GitHub repo. Here are the fixes I used.

Remove the require statements below in spec/spec_helper.rb to solve problems with RSpec. RSpec was running twice or getting undefined methods when I ran tests, but this fixed it (Source 1, 2).

- require 'rspec/autotest'
- require 'rspec/autorun'

If you have problems with the zeus rake command, try zeus rspec spec. I had to do this to fix an “Uninitialized constant FactoryGirl” error (Source).

Zeus can be picky about the order of your gems in the gemfile. Try reorganizing it or even adding it to your gemfile (although that will slow it down).

Lastly, if you see things behaving incorrectly, try restarting Zeus by using ctrl+c to stop it in the terminal where you’re running Zeus, and then running zeus start again.

Adding onto Zeus

If you use Sublime Text 2, utilize it with Sublime Text 2 Ruby Tests, which allows you to run tests inside of Sublime Text. Install it via the Package Manager or the GitHub repo. Then customize it to use Zeus by finding the RubyTest.sublime-settings file inside of the RubyTest package directory and copy it. Place the copy in the package User directory. Open the copied file and replace the run_cucumber_command and run_rspec_command settings with this:

There’s a great Railscast that goes over the Zeus installation as I did above and also covers alternatives called Spring and Command. If you like Zeus or have problems with it, check those out too. Spring looks pretty great and doesn’t require starting up separately, so I might do another post on it.

Let me know your experience with Zeus and if there are any other speedy gems out there by tweeting me or emailing me.