Can't deploy Rails app suddenly. Can't reach postgres

This was working fine and now it isn’t.

#0 1.963 ActiveRecord::ConnectionNotEstablished: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
#0 1.963        Is the server running locally and accepting connections on that socket?

I have confirmed the DATABASE_URL env var is set in the app. I’ve tried completely recreating the whole stack and it didn’t help.

How did you confirm this? The error above is what you would see if DATABASE_URL is not set.

Figured out my issue. I was trying to use the Flipper gem in my routes.rb file. Must be trying to do a database query too early in the runtime?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.