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

Fix rails console to work with DATABASE_URL for PostgreSQL #50089

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

fatkodima
Copy link
Member

Fixes #50085.

The regression was introduced via #50064 (cc @byroot).

Previously, ActiveRecord::Base was loaded before any specific database adapters, see https://github.com/rails/rails/pull/50064/files#diff-d1e52309089a1c9135a7d1bb82bdfdf7410d7d7a294013e16e71f0171154eefbL324-L334 so everything worked fine.
But with the refactoring, this is no longer the case and adapters are loaded first, see https://github.com/rails/rails/pull/50064/files#diff-4c1143afc3627a3ced3bd6f78f37888b98424844732e771c3cb323ef50415bb0R24-R37

@byroot
Copy link
Member

byroot commented Nov 17, 2023

Thanks!

@byroot byroot merged commit 6178b8b into rails:main Nov 17, 2023
4 checks passed
@fatkodima fatkodima deleted the fix-console-with-database-url branch November 17, 2023 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Passing DATABASE_URL env var breaks loading
2 participants