当您array(1
0 => array(4
0 => $a
1 => $b
2 => $c
3 => $d
)
)
出现错误时
rake db:migrate:up VERSION="
postgresql.conf中
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?
其他项目的迁移工作正常
#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
中的端口会导致其他项目中的迁移失败吗?
答案 0 :(得分:0)
好像你已经更改了config/database.yml
中的端口。您可以在5432
postgresql.conf
development:
adapter: postgresql
encoding: utf8
reconnect: false
database: development
pool: 5
username: postgres
password: password
host: localhost
port: 5454 # Change it to 5432