Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add details about exactly where to require the engine. #485

Merged
merged 1 commit into from
Jan 15, 2022

Conversation

phallstrom
Copy link
Contributor

This clarifies exactly where to require goodjob in config/application.rb
and adds a note about how to resolve the issue when the dashboard won't
reload after saving a file.

Context: I skimmed the README when I set it up and made my
application.rb look like this:


require "active_model/railtie"
require "active_job/railtie"
require "active_record/railtie"
require "active_storage/engine"
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_text/engine"
require "action_view/railtie"
require "action_cable/engine"
require "sprockets/railtie"

Bundler.require(*Rails.groups)

require "good_job/engine"

With this setup, the dashboard would work fine until I saved any file
(ie. a model). After that reloading the dashboard would give this error:

Routing Error
uninitialized constant GoodJob::ExecutionsController

By moving the require line before the Bundler.require line, this
problem went away.

This clarifies exactly where to require goodjob in config/application.rb
and adds a note about how to resolve the issue when the dashboard won't
reload after saving a file.

Context: I skimmed the README when I set it up and made my
application.rb look like this:

```require "rails"

require "active_model/railtie"
require "active_job/railtie"
require "active_record/railtie"
require "active_storage/engine"
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_text/engine"
require "action_view/railtie"
require "action_cable/engine"
require "sprockets/railtie"

Bundler.require(*Rails.groups)

require "good_job/engine"
```

With this setup, the dashboard would work fine until I saved any file
(ie. a model). After that reloading the dashboard would give this error:

Routing Error
uninitialized constant GoodJob::ExecutionsController

By moving the require line _before_ the `Bundler.require` line, this
problem went away.
@bensheldon
Copy link
Owner

Thank you for this Readme improvement! 🙌

@bensheldon bensheldon merged commit 055f623 into bensheldon:main Jan 15, 2022
@bensheldon bensheldon added the documentation Improvements or additions to documentation label Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants