PG::ConnectionBad in ProductsController#show

could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

Extracted source (around line #9):
7
8
9
10
11
12
              
def show
product = Product.find(params[:id])
if product.present?
redirect_to product.escaped_url
else

Rails.root: /app

Application Trace | Framework Trace | Full Trace

Request

Parameters:

{"id"=>"27"}

Response

Headers:

None