Fix rails console to work with DATABASE_URL
for PostgreSQL
#50089
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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