-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Concern causes app to connect to database when precompiling assets. #327
Comments
Hmmm ... I'm open to suggestions on a generalized approach at resolving this in a way that is backwards compatible and remains performant for existing users. Maybe something along the lines of checking |
Has there been any news on this? |
cbliard
added a commit
to hiptest/devise_token_auth
that referenced
this issue
Jan 19, 2017
Fixes lynndylanhurley#327 When precompiling assets while building a docker image, the database is not available and the DeviseTokenAuth::Concerns::User concern tries to load user table information from database and fails. It now checks if the database connection is established before gathering information about user table.
cbliard
added a commit
to hiptest/devise_token_auth
that referenced
this issue
Jan 20, 2017
Fixes lynndylanhurley#327 When precompiling assets while building a docker image, the database is not available and the DeviseTokenAuth::Concerns::User concern tries to load user table information from database and fails. It now checks if the database connection is available before gathering information about user table.
bartes
pushed a commit
to bartes/devise_token_auth
that referenced
this issue
Apr 13, 2017
Fixes lynndylanhurley#327 When precompiling assets while building a docker image, the database is not available and the DeviseTokenAuth::Concerns::User concern tries to load user table information from database and fails. It now checks if the database connection is available before gathering information about user table.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The user concern:
include DeviseTokenAuth::Concerns::User
causes the the app to try to connect to the database on initialize. This causes a problem when precompiling assets in a Dockerfile with
bundle exec rake assets:precompile
as no database is available during building the Docker image.
I have found a workaround for now by setting an environment variable dynamically:
The text was updated successfully, but these errors were encountered: