-
Notifications
You must be signed in to change notification settings - Fork 234
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
Rails 6 causing DATABASE_URL cannot be empty error for rake db:migrate? #3698
Comments
can you post your DATABASE_URL and config ? (make sure to remove passwords) |
This is my
My Just to clarify. The exact same environment variables and
|
from activerecords code it looks like it reads the then open up |
Similar issue was reproduced in my environment. I gave the url value in config.yml as an immediate value and db:migrate succeeded. production:
adapter: postgresql
url: postgres://postgres:[email protected]:5432/postgres
# url: "<%= ENV['DATABASE_URL'] %>" This issue does not seem to occur with |
alternative could be doing the rails 7 upgrade and seeing if that magically fixes it ... |
A little background here, I'm running Samson in Kubernetes, and every so often update the version of Samson and usually log into the pod after upgrading to run migrations. This has worked for the past few years without much issue. All the environment variables are correctly configured, and Samson has been working great.
However, after upgrading from
v2784
(old I know 🤦♂) tov3071
, I tried runningbin/rake db:migrate
and was met with the following error:Looking through releases I can see that in
v3052
rails was updated to v6. Running the same migrate command in versionv3051
, the database is migrated, all is hunky-dory. No errors 👍Apologies, but I don't really know too much about rails, but some Googling brings up this issue rails/rails#36610 – could this be related?
The text was updated successfully, but these errors were encountered: