Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Use DATABASE_URL by default #13578
See #13463 (comment) for full conversation.
I'm still looking into behavior of Active Record concerning environment variables. I would like to address consistency of behavior across multiple ways AR can be used, and re-visit the bike shed that is naming environment variables.
tl;dr I'm working on making behavior of Active Record consistent across all scenarios with regard to
Consistency of Environments
Here are all the ways that AR initiates a connection today:
We should make all of these behave exactly the same way, which if you dig into AR is non-trivial. I'm working to see if I can put all of this logic in one place for consistency, but as I mentioned, it's a non-trivial task.
Currently AR can be configured via the environment variable
I'm currently working on getting the above to work and be consistent with all environments, the last barrier I have to overcome is the Rake tasks. I expect this last bit to take 80% of the effort. This also brings me to my second topic: env var naming.
Env Var Naming
As I mentioned above, AR already has built in support for
I was originally
One of the initial reasons for namespacing was to prevent conflicts between different languages running on the same box. I think this is the minority case, a more likely use case would be multiple Rails applications on the same box. Using the
Deployment seems to be leaning towards using containers (through LXC, docker, or similar) which allows you to set a clean
By keeping this value standard, you could have your container generation code create a
I'm out to lunch on namespacing of
I'm interested in talking about this point more, right now I would recommend switching back from