Using single quotes in "default" part of the database.yml

rails
envars

#1

In our project we use a common setup in the database.yml for production and development and we dry those config in a default part of it.

some how this caused circle ci to notice the db_adapter and leave it there when generating its custom database.yml. the error comes when you reference the ENV VAR in the database yaml using single quotes instead of double quotes. Because you are using echo, this somehow ignores the quotes and outputs the it as ENV[DB_ADAPTER] which fails with a unrecognized constant error. se below

i believe something should be stated about this in some readme somewhere until theres a fix for that problem.


#2

Thanks for identifying the issue. I can confirm (with this open source repo) that switching to double quotes for env variables works around the problem: https://github.com/linuxfoundation/cii-best-practices-badge/issues/753


#3