Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Is "deployment" a zeus keyword? #117

sabcio opened this Issue · 2 comments

3 participants


I have a module App::Deployment and when I try to run tests I get:

zeus rspec spec  

/Users/sebek/project/app/models/app.rb:3:in `include': wrong argument type Class (expected Module) (TypeError)
    from /Users/sebek/project/app/models/app.rb:3:in `<class:App>'
    from /Users/sebek/project/app/models/app.rb:1:in `<top (required)>'

App is an ActiveRecord model:

class App < ActiveRecord::Base

  include Deployment

Deployment module:

module App::Deployment
  extend ActiveSupport::Concern


Renaming Deployment helps but I'm looking for some better solution.


Here's what I think the problem is:

Normally, the test environment uses eager loading, which means (to simplify) every constant in your load path is required all at once.

Zeus disables eager loading to make it faster.

Now, let's say you had these two objects:

1) class Deployment

2) module App::Deployment

With eager loading (as normally happens), the App::Deployment module would be properly selected for inclusion.

Without eager loading... It should still find the right module, but it appears it is not, and it's instead attempting to include the top-level Deployment class.

Is App::Deployment located in a discoverable path? Eg. Does its pathname end in app/deployment.rb? If it doesn't, it'll never really work with eager loading off.


module App::Deployment is at app/models/app/deployment.rb

class Deployment at app/models/deployment.rb

@burke any ideas? I'd love to use zeus in my everyday development.

@latortuga latortuga closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.