PG::ConnectionBad in ArticlesController#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 #12):
10
11
12
13
14
15
              
def show
@article = Article.find_by(permalink: params[:permalink]) || Article.find(params[:permalink])
@articles = Article.where.not(id: @article.id).published.order("RANDOM()").limit(3)
@products = ArticleParser.new(@article).products
end

Rails.root: /app

Application Trace | Framework Trace | Full Trace

Request

Parameters:

{"permalink"=>"5-messerblock"}

Response

Headers:

None