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

Expected /app/app/controllers/api/v1/base_controller.rb to define Api::V1::BaseController vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:503:in `load_missing_constant' #120

Closed
barmstrong opened this issue May 7, 2013 · 3 comments

Comments

@barmstrong
Copy link

Just upgraded to 0.0.21 and I'm getting these errors:

Expected /app/app/controllers/api/v1/base_controller.rb to define Api::V1::BaseController
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:503:in `load_missing_constant'

That file is in that exact location and it defined class Api::V1::BaseController < ApplicationController. It was working before the upgrade.

I was thinking maybe a load path change. I have this in the initializer config.api_controllers_matcher = File.join(Rails.root, "app", "controllers", "api", "**","*.rb").

Any ideas?

@iNecas
Copy link
Member

iNecas commented May 10, 2013

That's strange. Any changes in Rails stack? What version did work for you? Please try to set config.reload_controllers = false to see if anything changed.

@barmstrong
Copy link
Author

Reverting to 0.0.11 was what fixed it. So must be some difference in between those versions.

Setting reload_controllers to false seemed not let us load the page at all. Sorry I was not clear on how that part was supposed to work in development?

Made sure to kill the app servers and restart after upgrading. Very strange stuff. Btw this is on heroku also, not sure if that is related.

@barmstrong
Copy link
Author

This fixed it:

config.reload_controllers = !Rails.env.production?

Or just removing the line, since it is already set to be true in dev and false in production by default. Thanks for the tip!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants