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

Defaults set in initializer are not reloaded when application is reloaded #1

Closed
shioyama opened this issue Mar 5, 2017 · 2 comments
Labels

Comments

@shioyama
Copy link
Owner

shioyama commented Mar 5, 2017

This seems to happen with Spring in a Rails project. When spring reloads, the defaults in the Mobility configuration are reset and not reloaded from the initializer, so you see the exception Backend option required if Mobility.config.default_backend is not set.".

Not yet quite sure why this happens, just posting this for now to remember to fix it.

@shioyama shioyama added the bug label Mar 5, 2017
@shioyama
Copy link
Owner Author

shioyama commented Mar 5, 2017

Quick fix for this for now is just to make sure that every model has its backend set explicitly, with e.g. backend: :key_value.

@shioyama
Copy link
Owner Author

shioyama commented Mar 5, 2017

Fixed this, I was using request store for the global configuration - changed it to normal memoization in 478b669 which fixes it.

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

No branches or pull requests

1 participant