I’m trying to set up a build environment with PG10. Despite my best efforts I cannot resolve this error:
PG::ConnectionBad: FATAL: role "ubuntu" does not exist
I’ve tracked this down to an ENV variable DATABASE_USER being set to “ubuntu”. I cannot figure out how or where this variable comes from. I rely upon this env var being set correctly for all of my Rake tasks involving my database connection. Given the size of my app and the effort involved, renaming this variable is too much of a pain. Where does this come from? Why can’t I stomp on this variable? How does I fix this?
It turns out I had set some environment variables in the Build Settings of my project. Woo! I’m glad to have tracked this down. It was definitely a fun mystery.