2017-02-24 5 views
0

Wenn Sie rake db:migrate:up VERSION=" tun ein FehlerPG :: Fehler: konnte keine Verbindung zum Server: Connection refused

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 erscheint

#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) 

Die Migration in anderen Projekten arbeiten gut

gem 'pg' 0.14.1 

postgresql 9.3 

Wie den Fehler zu entfernen? Wo hat 5454 Port?

Wenn ich den Port in postgresql.conf ändern kann die Migration in anderen Projekten fallen?

+0

ist der Port 5454 angegeben in der Konfigurationsdatei 'config/database.yml' sehen kann? – Ctx

Antwort

0

Scheint, Sie haben den Port in config/database.yml geändert. Der Standardport ist 5432 wie Sie in Ihrem 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 
Verwandte Themen