ruby-on-rails – PostgreSQL:postgres不知道在哪里可以找到服
发布时间:2020-12-17 02:23:03 所属栏目:百科 来源:网络整理
导读:我正在尝试将postgreSQL配置为我的本地开发数据库. 我跑的时候 brew install postgres 我收到以下错误: postgresql-9.3.5 already installed 在我的Gemfile中,我在gem列表中有pg. 我跑的时候 rake db:create:all 我收到以下错误: could not connect to ser
我正在尝试将postgreSQL配置为我的本地开发数据库.
我跑的时候 brew install postgres 我收到以下错误: postgresql-9.3.5 already installed 在我的Gemfile中,我在gem列表中有pg. 我跑的时候 rake db:create:all 我收到以下错误: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? 我的database.yml如下所示: development: adapter: postgresql encoding: unicode database: fls_development host: localhost pool: 5 port: 5432 # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: adapter: postgresql database: fls_test pool: 5 timeout: 5000 default: &default adapter: postgresql encoding: unicode pool: 5 此外,类似于这篇文章:How to configure PostgresSQL server on MacOS 10.8.5?,当我只是典型的postgres时,我得到以下错误 postgres does not know where to find the server configuration file. You must specify the --config-file or -D invocation option or set the PGDATA environment variable. 我很困惑,因为前面提到的SO帖子的解决方案建议使用Homebrew安装,但我很确定这是我安装它的方式. 解决方法
所以,这是一种间接解决方案,但我只是运行brew uninstall postgresql,然后安装了PostgreSQL应用程序,该应用程序在正确的端口5432上自动运行.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |