Yesterday wasn\"t this error. I didn\"t make any kind of changes in my application.Just went to sleep and also now I gain this.

You are watching: Pg::connectionbad: could not connect to server: no such file or directory

Error:

home/dartnyan/.rvm/gems/ruby-2.3.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `initialize\": can not attach to server:No such document or brochure (PG::ConnectionBad)Is the server to run locally and also acceptingconnections on Unix domain socket \"/var/run/postgresql/.s.PGSQL.5432\"?database.yml

default: &default adapter: postgresql pool: 5 imeout: 5000development: adapter: postgresql database: shop_development pool: 5 username: dartnyan password: kurt1245test: adapter: postgresql encoding: unicode database: shop_test pool: 5 username: dartnyan password: kurt1245

\"*\"

I found that inputting the following into terminal helps:

$ cd /usr/local/var/postgres/$ rm postmaster.pidI uncovered this end at http://alumni.lewagon.org/questions/60

It additionally describes what could be happening. The document may acquire corrupt if Postgresql was not closed \"gracefully\". Instance would it is in if her battery on her laptop to be to die.


\"*\"

Looks prefer the postgres server isn\"t running. Begin the server by running

sudo business postgresql begin

\"*\"

On her terminal, please run this command

rm /usr/local/var/postgres/postmaster.pidor if you have actually a specific version the postgres:

## version 11 for examplerm /usr/local/var/postgresql

\"*\"

\"*\"

In mine case, this is caused by an upgrade of mac os, my configuration is Ruby 2.6.3 and also rails 6.0.3.4 and also I require PostgreSQL 12, verify that you have actually the correct variation of PostgreSQL reinstall if girlfriend need and finally execute in her project:

gem uninstall pg

bundle install


Thanks because that contributing an answer to stack Overflow!

Please be sure to answer the question. Carry out details and share your research!

But avoid

Asking because that help, clarification, or responding to other answers.Making statements based upon opinion; back them increase with referrals or personal experience.

See more: Ejercicio Para Aumentar El Busto Con Remedios Caseros, Aumentar Busto

To discover more, see our tips on writing good answers.


article Your answer Discard

By click “Post her Answer”, you agree come our terms of service, privacy policy and also cookie policy


Not the answer you're looking for? Browse various other questions tagged ruby-on-rails postgresql or ask your very own question.


site style / logo © 2021 ridge Exchange Inc; user contributions licensed under cc by-sa. Rev2021.10.14.40466


her privacy

By click “Accept every cookies”, girlfriend agree stack Exchange have the right to store cookies on your maker and disclose info in accordance with our Cookie Policy.