Ruby on rails PG::错误:无法连接到服务器:连接被拒绝
执行Ruby on rails PG::错误:无法连接到服务器:连接被拒绝,ruby-on-rails,postgresql,Ruby On Rails,Postgresql,执行rake db:migrate:up VERSION=“时,会出现错误 PG::Error: could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5454? postgresql.conf #listen_addresses = 'localh
rake db:migrate:up VERSION=“
时,会出现错误
PG::Error: could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5454?
postgresql.conf
#listen_addresses = 'localhost' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost'; use '*' for all
# (change requires restart)
port = 5432 # (change requires restart)
其他项目中的迁移工作正常
gem 'pg' 0.14.1
postgresql 9.3
如何删除错误?在哪里输入了5454
端口
如果我在
postgresql.conf
中更改端口,可能会导致其他项目中的迁移失败?似乎您已经在config/database.yml
中更改了端口。默认端口是5432
,正如您在postgresql.conf
中看到的那样
开发:
适配器:postgresql
编码:utf8
重新连接:false
数据库:开发
游泳池:5
用户名:postgres
密码:密码
主机:本地主机
端口:5454#将其更改为5432
是在配置文件config/database.yml
中指定的端口5454吗?