rake:db setup error (failed to connect to postgresql) in the Ubuntu subsystem for Windows

Asked

Viewed 89 times

1

Hello! I am using the Ubuntu subsystem (18.04) in windows com ruby on Rails (ruby version 2.5.1 and Rails 5.2.2) and with Postgresql in version 10. I surrounded a rake db:setup at the root of my Rails project and returned the following error:

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"? Couldn’t create db/devpostgresql' database. Please check your Configuration. rake aborted!

I followed this tutorial to install and configure the Ubuntu subsystem on Windows along with ruby on Rails and postgresql:

https://gorails.com/setup/windows/10#git

postgresql was installed in windows as it is recommended

  • Take a look at this link: https://medium.com/@stephanedmonson/Solution-for-Connecting-postgresql-via-wsl-windows-Subsystem-for-linux-ubuntu18-c79940fa5742 And I think it would be better to run postgres on windows if possible.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.