github.com/nycdavid/zeus@v0.0.0-20201208104106-9ba439429e03/README.md (about)

     1  # Zeus
     2  
     3  [![Join the chat at https://gitter.im/zeus-application-preloader/Lobby](https://badges.gitter.im/zeus-application-preloader/Lobby.svg)](https://gitter.im/zeus-application-preloader/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
     4  [![Build Status](https://travis-ci.org/burke/zeus.svg?branch=master)](https://travis-ci.org/burke/zeus)
     5  
     6  Zeus preloads your Rails app so that your normal development tasks such as `console`, `server`, `generate`, and specs/tests take **less than one second**.
     7  
     8  This screencast gives a quick overview of how to use zeus with Rails.
     9  
    10  [![Watch the screencast!](http://s3.amazonaws.com/burkelibbey/vimeo-zeus.png)](http://vimeo.com/burkelibbey/zeus)
    11  
    12  Zeus is also covered in [RailsCasts episode 412](http://railscasts.com/episodes/412-fast-rails-commands).
    13  
    14  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.
    15  
    16  
    17  ## Requirements (for use with Rails)
    18  
    19  * OS X 10.7+ *OR* Linux 2.6.13+
    20  * Rails 3.x or 4.x
    21  * Compatible Ruby installation
    22    * Ruby 2.0+
    23    * Rubinius
    24  
    25  **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.
    26  
    27  
    28  ## Installation
    29  
    30  Install the gem.
    31  
    32      gem install zeus
    33  
    34  Q: "I should put it in my `Gemfile`, right?"
    35  
    36  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.
    37  
    38  #### IMPORTANT
    39  
    40  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](https://github.com/burke/zeus/issues/134) for more information).
    41  
    42  
    43  ## Rails Set up 
    44  
    45  In your app's directory initialize zeus:
    46  
    47      zeus init
    48  
    49  which will create two files
    50  
    51      custom_plan.rb
    52      zeus.json
    53  
    54  Force the test environment: In `test/test_helper.rb` (or `spec/spec_helper.rb` if using RSpec), change:
    55  
    56  
    57      ENV['RAILS_ENV'] ||= 'test'
    58  
    59  To:
    60  
    61      ENV['RAILS_ENV'] = 'test'
    62  
    63  _More helpful set up hints at [this very nice guide put together by Thoughtbot](https://robots.thoughtbot.com/improving-rails-boot-time-with-zeus)_
    64  
    65  ## Usage
    66  
    67  Start the server:
    68  
    69      zeus start
    70  
    71  The server will print a list of available commands.
    72  
    73  Run some commands in another shell:
    74  
    75      zeus console
    76      zeus server
    77      zeus test test/unit/widget_test.rb
    78      zeus test spec/widget_spec.rb
    79      zeus generate model omg
    80      zeus rake -T
    81      zeus runner omg.rb
    82  
    83  ## Limitations
    84  
    85  You need to restart zeus if you make changes to various initialization files. Examples of these files include:
    86  
    87   * FactoryGirl factories
    88   * RSpec support files
    89  
    90  ## Related gems
    91  
    92  * [Spork](https://github.com/sporkrb/spork) - a [DRb server](http://www.ruby-doc.org/stdlib-1.9.3/libdoc/drb/rdoc/DRb.html) that forks before each run to ensure a clean testing state
    93  * [Commands](https://github.com/rails/commands) - a persistent console that runs Rails commands without reloading the env
    94  * [Spring](https://github.com/rails/spring) - like Zeus but in pure Ruby, totally automatic, and included in Rails 4.1+.
    95  
    96  If you're switching from Spork, be sure to [read the wiki page on Spork](https://github.com/burke/zeus/wiki/Spork).
    97  
    98  
    99  ## Customizing Zeus Commands
   100  
   101  To add/modify commands, see [`docs/ruby/modifying.md`](docs/ruby/modifying.md).
   102  
   103  
   104  ## Contributing
   105  
   106  To get started hacking on Zeus itself, see [`docs/overview.md`](docs/overview.md).
   107  
   108  See also the handy contribution guide at [`contributing.md`](contributing.md).
   109  
   110  
   111  ## Rails 2.3 Support
   112  
   113  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](https://github.com/tyler-smith/zeus-rails23), however it has not been updated in some time.
   114  
   115  ## Legacy Ruby Versions
   116  
   117  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](https://github.com/burke/zeus/tree/v0.15.4).
   118