I need to specify a path in a database.yml file that isn’t in the application I’m using.
My initial attempts were unsuccessful, and my search terms unclear so I haven’t turned up a definitive way of specifying a specific file path outside of the rails application, yet.
How do I do this? Or rather what is the best way to do this, in a non database driver specific manner (as I’ll be using sqlite, mysql and postgresql in my development/testing)?. I have the basic gist from simple applications, but my environment is getting a bit more complicated and I need to centralize a number of db to one, and then specify this per application.
A bit of erb inserted into the database.yml db field indicating a path relative to rails root appears to work at first glance. So, ‘use erb’ is the first obvious answer.