Boot any rails app in under a second.
Zeus preloads your Rails app so that your normal development tasks such as
generate, and specs/tests take less than one second.
This screencast gives a quick overview of how to use zeus with Rails.
Zeus is also covered in RailsCasts episode 412.
More generally, Zeus is a language-agnostic application checkpointer for non-multithreaded applications. Currently only ruby is targeted, but explicit support for other languages is possible.
Please note: Zeus requires your project to be running on a file system that supports FSEvents or inotify. This means no NFS, CIFS, Samba, or VBox/VMWare shared folders.
Install the gem.
gem install zeus
Q: "I should put it in my
A: No. You can, but running
bundle exec zeusinstead of
zeusadds precious seconds to commands that otherwise would be quite a bit faster. Zeus was built to be run from outside of bundler.
It is common to see tests running twice when starting out with Zeus. If you see your tests/specs running twice, you should try disabling
require 'rspec/autorun'(for RSpec), or
require 'minitest/autorun'(for Minitest). (see #134 for more information).
In your app's directory initialize zeus:
which will create two files
Force the test environment: In
spec/spec_helper.rbif using RSpec), change:
ENV['RAILS_ENV'] ||= 'test'
ENV['RAILS_ENV'] = 'test'
More helpful set up hints at this very nice guide put together by Thoughtbot
Start the server:
The server will print a list of available commands.
Run some commands in another shell:
zeus console zeus server zeus test test/unit/widget_test.rb zeus test spec/widget_spec.rb zeus generate model omg zeus rake -T zeus runner omg.rb
You need to restart zeus if you make changes to various initialization files. Examples of these files include:
If you're switching from Spork, be sure to read the wiki page on Spork.
The default plan bundled with zeus only supports Rails 3.x and 4.x. There is a project to provide Rails 2.3 support here, however it has not been updated in some time.
Due to official Ruby support lapsing in Feb 2015, Ruby 1.9.3 and below are no longer officially supported. Zeus may work with them but we are not actively supporting them at this time. The last release tested with these versions is 0.15.4.