Skip to content

Uninitialized constant GoodJob::JobsController #674

Closed
@mdavidn

Description

I can consistently break good_job's code reloading in my app, confirmed in Rails 6.1 and 7.0.

I never need good_job to reload its code while my application is running, so it's not clear to me why zeitwerk is a runtime dependency. #87 didn't shed any light on this. Perhaps it should be a development dependency?

Steps to reproduce

  1. Create a new Rails app
  2. Add good_job, mount engine
  3. Start and wait for server
  4. Make any change to application code
  5. Try http://localhost:3000/good_job.
gem install rails
rails new good_job_demo --database=postgresql
cd good_job_demo
bundle add good_job
bin/rails generate good_job:install
bin/rails db:create db:migrate
cat <<RUBY > config/routes.rb
Rails.application.routes.draw do
  mount GoodJob::Engine => 'good_job'
end
RUBY
bin/rails server

open http://localhost:3000/good_job # Confirm working, optionally

touch config/routes.rb # or app/controllers/application_controller.rb 
open http://localhost:3000/good_job # Broken

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions