0
다음은 나의 오류입니다. postgresql에서 오류를 연결할 수 없습니다.
PG::Error - could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
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 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (fe80::1) and accepting
TCP/IP connections on port 5432?
나는 그것이 내가 내 bash는 파일이 추가했다이 버전을 인식 얻기 위해/usr/지방/빈/psql의 에 사제를 사용하여 PostgreSQL을 설치했습니다. 내가
http://0.0.0.0:3000
에 응용 프로그램을 보려고하면 내 레일 응용 프로그램 및 실행 명령에 내가 CD를
rails s
는 그런 다음
=> Booting Thin
=> Rails 4.0.0.beta1 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
>> Thin web server (v1.5.0 codename Knife)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop
으로 시작되면
export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH"
내가 얻을 위의 오류 사람이 왜 이런 일이 일어날 지 알 것입니다.
postgres는 서버 구성 파일을 찾을 위치를 알지 못합니다. --config-file 또는 -D 호출 옵션을 지정하거나 PGDATA 환경 변수를 설정해야합니다. – user1096509
명령 줄 'brew info postgres'를 사용하여 시작하는 방법을 찾았습니다. 시작 줄은 'pg_ctl -D/usr/local/var/postgres -l /usr/local/var/postgres/server.log start'입니다. – user1096509
mysql에서 postgres로 변경했을 때 Nitrous.io에서이 오류가 발생했습니다. 상자를 다시 시작하고 database.yml을'host : localhost'로 변경하고'listen address를 '*''로 변경해야했습니다. 최종 해결책은 [여기] (https://serverfault.com/questions/461257/cant-connect-to-postgres-in-production/461265#461265)에서 발견되었습니다. – Shadoath