Before start working with Zeus be sure that:
We recommend to use Zeus version 0.13.4.pre2. Zeus can also be installed in a remote SDK.
|Please note that you can't use Zeus with RubyMotion apps.|
To start Zeus server please go to Tools | Run Zeus Server... menu. Make sure the server is started and all its commands are available:
If the server is started all the Rails generators and Rake tasks are running under Zeus. For example to generate a scaffold go to Tools | Run Rails Generator... menu and choose scaffold:
After setting up a new model name and fields all the necessary files are generated with zeus generate scaffold command:
Now the Rake command (Tools | Run Rake Task...) can be invoked:
Migration is done with a help of Zeus as well:
|Please note that Zeus doesn't allow to choose environment to run its commands in. So even if environment is chosen for Rails generator or Rake task the command is executed in a default one. Find more details.|
To start Rails server using Zeus please go to Run | Edit Configurations... and choose Zeus as a server in Rails run/debug configuration:
Now run the configuration:
If Zeus server is not started, the default Rails server will be started instead.
No matter what tests you use, Rspec, Cucumber, Test::Unit, or Minitest, you can run them under Zeus. If you are going to run your tests for the first time just run Zeus server first and then choose the tests to run:
Tests are run under Zeus:
|If both Spork and Zeus servers are started tests are run under Zeus by default.|
If your tests have been run before with no Zeus started and the corresponding run/debug configuration was already created please go to Run | Edit Configuration... and choose Zeus as a pre-load server:
|Please note that you need to restart Zeus if any initialization files such as FactoryGirl factories, RSpec support files, and others were changed according to Zeus limitations.
If your Rspec tests are run twice comment require 'rspec/autorun' in your spec_helper.rb according to Zeus issue.
To debug your Rails app first of all stop Zeus server if it is started and run it in debug mode. When Zeus server was started at the first time Zeus run/debug configuration was created:
To run Zeus server in debug mode go to Run | Debug... menu and choose this run configuration or use the Toolbar:
After Zeus server is started in debug mode run the Rails server under Zeus as it is described above:
Now you can set the breakpoints and debug your app:
|Please note that you're not allowed to debug your tests under Zeus or Spork. Use pre-load server setting in any test run/debug configuration is ignored when the one is started in debug mode.|
To run Rails console under Zeus first of all run Zeus server and go to Tools | Run Rails Console..., be sure that Use Zeus Server option is checked:
Now the Rails console is started under Zeus:
|Please note that Rails console can be run in a default environment only.|
If you need to run any Zeus command with custom arguments you can create Zeus Server run/debug configuration. Just go to Run | Edit Configuration..., press + and choose Zeus Server. Now you can choose command and set up the configuration: