“Unable to autoload constant” Bug in Rails 5.2.0
问题 I'm running a Rails 5.2.0 application. This LoadError always appears on the first request after a reboot or a recompile: Unable to autoload constant Api::V1::ApplesController, expected /fruits_and_vegetables/app/controllers/api/v1/apples_controller.rb to define it The pertinent files: routes.rb Rails.application.routes.draw do namespace :api do namespace :v1 do get 'apples', to: 'apples#get' end end end Here's the file structure: - app - controllers - api - v1 - apples_controller.rb What's in