My application has a number of controller concerns in
When I work on this in development, everything works well. However, as soon as I push to production, I get the following error when the rails server boots up:
Uninitialized constant Concerns::MyConcern (NameError)
My concerns look like this:
# some stuff here
I have set up
config.eager_load = true
in both my production and development environments to try and make them as consistent as possible; however, still not seeing this error occur in production.
What's strange is if I comment out the areas where I include the concerns in the controllers, the application manages to boot up; then, when I go to rails console on the production server and see if I can access Api::V2::Concerns::MyConcern I am able to access it without error. This makes me think that there's some sort of autoloading issue going on where the concerns aren't loaded when they are called in the controllers; however, I was under the impression that Rails loaded up everything in the app/ folder automatically and only areas such as the /lib had to be explicitly added.
As an FYI, my controller sits in
Any ideas what could be happening here?