PostgreSQL error 'Could not connect to server: No such file or directory'

前端 未结 22 1926
梦谈多话
梦谈多话 2020-11-29 17:20

Like some others I am getting this error when I run rake db:migrate in my project or even try most database tasks for my Ruby on Rails 3.2 applications.

22条回答
  •  情话喂你
    2020-11-29 17:57

    There might be different issues with running PostgreSQL locally. I would recommend to clean all versions of postgres installed and start fresh. Once you have it installed, it's very easy to recreate your database if you have your rails project with the up to date db/schema.rb

    Here is how I usually install PostgreSQL on a Mac. If you're running your database under the root user locally, you might want to omit the last step that creates a todo user

提交回复
热议问题