• Stars
    star
    3,329
  • Rank 13,465 (Top 0.3 %)
  • Language
    Go
  • License
    MIT License
  • Created over 12 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Boot any rails app in under a second.

Zeus

Join the chat at https://gitter.im/zeus-application-preloader/Lobby Build Status

Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.

This screencast gives a quick overview of how to use zeus with Rails.

Watch the screencast!

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.

Requirements (for use with Rails)

  • OS X 10.7+ OR Linux 2.6.13+
  • Rails 3.x or 4.x
  • Compatible Ruby installation
    • Ruby 2.0+
    • Rubinius

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.

Installation

Install the gem.

gem install zeus

Q: "I should put it in my Gemfile, right?"

A: No. You can, but running bundle exec zeus instead of zeus adds precious seconds to commands that otherwise would be quite a bit faster. Zeus was built to be run from outside of bundler.

IMPORTANT

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/autotest' and require 'rspec/autorun' (for RSpec), or require 'minitest/autorun' (for Minitest). (see #134 for more information).

Rails Set up

In your app's directory initialize zeus:

zeus init

which will create two files

custom_plan.rb
zeus.json

Force the test environment: In test/test_helper.rb (or spec/spec_helper.rb if using RSpec), change:

ENV['RAILS_ENV'] ||= 'test'

To:

ENV['RAILS_ENV'] = 'test'

More helpful set up hints at this very nice guide put together by Thoughtbot

Usage

Start the server:

zeus start

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

Limitations

You need to restart zeus if you make changes to various initialization files. Examples of these files include:

  • FactoryGirl factories
  • RSpec support files

Related gems

  • Spork - a DRb server that forks before each run to ensure a clean testing state
  • Commands - a persistent console that runs Rails commands without reloading the env
  • Spring - like Zeus but in pure Ruby, totally automatic, and included in Rails 4.1+.

If you're switching from Spork, be sure to read the wiki page on Spork.

Customizing Zeus Commands

To add/modify commands, see docs/ruby/modifying.md.

Contributing

To get started hacking on Zeus itself, see docs/overview.md.

See also the handy contribution guide at contributing.md.

Rails 2.3 Support

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.

Legacy Ruby Versions

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.

More Repositories

1

matcher

[abandoned] Intelligently searches through a list of file names for the one you were probably looking for.
C
141
star
2

howto-go-with-cpp

[abandoned]
C++
120
star
3

monkeysupport

[abandoned] C extensions monkeypatching ActiveSupport for improved perfomance
Ruby
97
star
4

minidev

Like dev, only lots worse!
Ruby
66
star
5

webconfig

[abandoned] generate apache and nginx vhosts from single yaml manifest
Ruby
38
star
6

color-theme-ir-black

[abandoned] IR Black Color Theme for Emacs.
Emacs Lisp
33
star
7

fuckyeahnouns

[abandoned]
Ruby
15
star
8

mintchip

[abandoned] Ruby API wrapper for MintChip
Ruby
13
star
9

mesos-ruby

[abandoned]
C++
8
star
10

archaeologit

[abandoned] Github Plugin thingy to show interactive history of single files.
JavaScript
6
star
11

async-shell-prompt

Rust
6
star
12

resume

My resume! Probably a good starting point for a LaTeX resume of your own.
6
star
13

gorby

[abandoned] ruby in go.
C
5
star
14

Altimeter

[abandoned] A stupid-simple demo ruby motion app.
Ruby
5
star
15

business_days

[abandoned] ActiveSupport mini-extension to allow adding business_days to time objects.
Ruby
4
star
16

cljtemplate

[abandoned] A simple template project to compile clojure to a jarfile, using ant.
Clojure
4
star
17

testify

[abandoned] Testing Evolved
Ruby
4
star
18

cmultibyte

[abandoned]
C
4
star
19

wunderprompt

[abandoned] Tons of git and other information in your {zsh,fish,bash,etc.} prompt, without the nearly-1s generation times
4
star
20

crush

[abandoned] Chromium RUby SHell: A mixed traditional/ruby shell.
Ruby
3
star
21

xml-object

[abandoned] The Rubyista's way to do quick XML sit-ups
Ruby
3
star
22

OSXMonad

[abandoned] Start of an attempt at an imitation at a tiling WM for OS X
Objective-C
3
star
23

andand2

[abandoned] Just like andand, only better.
Ruby
3
star
24

ruby-timsort

[abandoned] adding python's timsort to ruby's enumerable
C
3
star
25

nanomemo

[abandoned]
Go
3
star
26

kindle2anki

Ruby
3
star
27

pandemic

[abandoned] simple app for a research paper
JavaScript
2
star
28

roxo

[abandoned] A simpler way to interact with XML in Ruby
Ruby
2
star
29

joust-meta

[abandoned] Metadata for Joust, an Emacs package manager.
Emacs Lisp
2
star
30

rcstorable

[abandoned] A partially-complete implementation of perl Storable's thaw in Ruby C
C
2
star
31

performance-presentation

[abandoned]
Ruby
2
star
32

go-sigcont

[abandoned]
Go
2
star
33

burkelibbey.org

[abandoned] Webby source for my personal site
JavaScript
2
star
34

ttyutils

A few tty functions that suck in the stdlib or need cgo by default.
Go
2
star
35

treediff

Quickly find the difference between two parallel directories
Go
2
star
36

rubidium

[abandoned] Concatenates and minifies javascript files.
Ruby
2
star
37

autolink

[abandoned] Automatically generate nested paths in Rails 2.3 according to your application's setup
Ruby
2
star
38

fastandand

[abandoned]
Ruby
2
star
39

linkify_errors

[abandoned]
Ruby
2
star
40

joust

[abandoned] An Emacs package manager. Currently very alpha, soon to be very awesome.
Emacs Lisp
2
star
41

ttc

Count tokens in a UNIXy way
Rust
2
star
42

chyve

[abandoned]
Python
2
star
43

roccofy

[abandoned] A very simple sinatra app to run rocco on any ruby files in a project.
Ruby
2
star
44

bartenderinthebox

[abandoned] Barduino on steroids
Ruby
2
star
45

ruby-import

Ruby
2
star
46

voting

[abandoned] Extremely quickly-hacked-together system to handle our IEEE student branch elections
Ruby
2
star
47

multilogger

[abandoned] Extends ActiveSupport::BufferedLogger to write to multiple files based on pattern matching.
Ruby
2
star
48

text.umes

[abandoned] A simple textbook exchange website for the UofM Engineering Society
Ruby
2
star
49

alfredextensions

[abandoned] A set of extensions to use with our watchr setup
1
star
50

tui

Ruby
1
star
51

engineyard-contest

[abandoned] code for an old contest
C
1
star
52

devcon-ios

[abandoned]
Objective-C
1
star
53

project-templates

[abandoned] You probably don't care about this.
Ruby
1
star
54

tranquality

[abandoned] Ruby code quality tools
Ruby
1
star
55

speedytime

[abandoned]
Ruby
1
star
56

uofwvoting

[abandoned] simple SC app
JavaScript
1
star
57

mysql_incremental_query

[abandoned] Query massive datasets without initial query delay. Stupid simple monkeypatch.
Ruby
1
star
58

zeus-extended-testcases

[abandoned] Full (toy) applications to test zeus against
Ruby
1
star
59

offset_issue

[abandoned]
Ruby
1
star
60

mongolite

[abandoned]
1
star
61

devcon

[abandoned] devcon
Objective-C
1
star
62

simpletodo

[abandoned] tiny little todo list app with javascript and localStorage.
JavaScript
1
star
63

coursework

[abandoned] Stuff I did at UofM
Java
1
star
64

infinitychannel

[abandoned] Infinite channels in go, kinda.
Go
1
star
65

coffeeclock

[abandoned] An alarm clock that makes espresso for me. mmm....
C++
1
star
66

coderetreat

[abandoned]
JavaScript
1
star
67

metaprogramming_talk

[abandoned] In progress.
JavaScript
1
star
68

vtocc

[abandoned] ruby vtocc driver -- not yet usable
Ruby
1
star
69

whatever

Objective-C
1
star
70

quicklaunch

[abandoned] EXTREMELY PRE-ALPHA: a Quicklaunch bar for your web application. Heavily inspired by quicksilver / google quick search bar
CoffeeScript
1
star
71

txt10

[abandoned]
JavaScript
1
star
72

fork_buddy

[abandoned] Savepoint your code!
Ruby
1
star
73

fastcrc64

[abandoned] Table-driven CRC64 implementation for Go
Go
1
star
74

redditslideshow

[abandoned] a simple (and inefficient!) jQuery thingy to show a slideshow of /r/pics
JavaScript
1
star
75

burke.github.com

[abandoned]
JavaScript
1
star
76

class_inheritable_attributes

[abandoned] Forward-port of deprectaed ClassInheritableAttributes functionality removed in rails 3.2
Ruby
1
star
77

ardrone

[abandoned] placeholder for when I get one :(
Clojure
1
star
78

rack-databases

[abandoned] Easy switching between databases for painless development with multiple environments
Ruby
1
star
79

skyway

[abandoned] A rails-inspired MVC-ish web framework in clojure, based on Compojure source
Clojure
1
star
80

enso

[abandoned]
Ruby
1
star
81

coderetreat-september-2011

[abandoned] Code from each of the 5 sessions
Ruby
1
star
82

rabit

[abandoned] rabin fingerprinting with UX analogous to git (rabin git ... rabit ... ha ha)
Go
1
star
83

ohno

Shell
1
star
84

memoization

[abandoned] Forward-port of ActiveSupport::Memoizable for 3.2 and beyond. Because it's actually useful.
Ruby
1
star
85

orb

[abandoned] ORB is a tool to write tests interactively.
Ruby
1
star
86

zeus.is

[abandoned] minisite for zeus
PHP
1
star
87

ndoc

Ruby
1
star
88

reddit-notifier

[abandoned]
Clojure
1
star
89

duckface.ca

[abandoned] Simple site I threw together for my girlfriend from a template
PHP
1
star
90

haskell-ruby

[abandoned] ffi junk
C
1
star
91

packsnap

[abandoned]
C++
1
star