1

I have a Rails 4 application, tested with stock minitest. Zeus is set-up and working, so is Guard.

However, when I have Zeus running and fire Guard, it does not speed up: Guard does not seem to use Zeus for faster booting, despite having

guard 'minitest', :zeus => true do 
end

in the guardfile. Is this simply not (yet) supported in Rails4? Am I missing some crucial bit of configuration?

Some additional details: when I run my tests with zeus rake test they are slow; comparable to running them without zeus rake test. When running with zeus test test/ they are ten times faster, but they run twice (a known issue, yet maybe a hint to what I am doing wrong?). Also not that I fire up Guard with bundle exec guard, because that is what Guard tells me to do.

berkes
  • 26,996
  • 27
  • 115
  • 206

2 Answers2

1

Try using spring. https://github.com/jonleighton/spring

Add this to your gem file:

gem "spring"

Run bundle install.

Use this for your Guardfile:

guard "minitest", all_on_start: false, spring: true do

Remember the first time you run guard it will take the normal amount of time because it is loading the environment. After the first run it will significantly increase the loading speed.

mpiccolo
  • 662
  • 5
  • 14
  • While migrating (back) to spring is an option if that works flawlessly, I don't think this is a solution for my problem, merely an alternative for what gives me a problem. I moved from spring to Zeus for several reasons, a.o. the much smarter reloading of Zeus; not having to restart your main thread after many minor change is a huge win. – berkes Sep 27 '13 at 07:58
  • 1
    I have given zeus several tries and have not been able to configure it work properly with guard. I also have not had any thread restarting issues you speak of with spring. If I do run into them and zeus ends up solving this problem I will delete my answer. – mpiccolo Sep 30 '13 at 18:10
0

For some reason, I was using a really old guard and guard-minitest 0.4.x. Updating them to the current 2.x.x version solves my issues.

berkes
  • 26,996
  • 27
  • 115
  • 206