저는 방금 기본 sqlite3 데이터베이스를 사용하는 응용 프로그램 작업을 시작했습니다. 나는 PostgreSQL 데이터베이스를 사용하도록 변경 한 다른 응용 프로그램으로 갔다. 그것은 wouldnt 연결하고 오류 페이지와 함께 올라와. 나는 내 PC (Windows 10)를 리셋 할 수 있도록 이전의 레일 서버 세션을 중단하지 않았을 것이라고 생각했다. 나는 다시 시작했고 같은 오류가났다.레일에서 로컬 서버를 시작하는 데 문제가 있습니까?
PG::ConnectionBad
could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
Extracted source (around line #56):
### Convenience alias for PG::Connection.new.
def self::connect(*args)
return PG::Connection.new(*args)
end
실행중인 레일 서버 세션이 없는지 확인하는 방법이 있습니까?
database.yml을 연결 실패의 원인이 무엇
default: &default
adapter: postgresql
pool: 5
timeout: 5000
development:
<<: *default
database: nutri_development
test:
<<: *default
database: nutri_test
production:
<<: *default
database: nutri_production
prepared_statements: false
encoding: unicode
?
이 프로젝트가 진행되는 동안 로컬 호스트 3000 페이지를 사용했는데, 왜 이런 일이 발생하는지 이해하지 못합니다. 이 문제를 해결하는 데 도움이되도록 편집에 게시해야하는 다른 파일에 대해 조언하십시오.
수 PC에서 postgresql이 온라인 상태인지 확인합니다. – coderhs
가능한 복제본 https://stackoverflow.com/questions/13684915/kill-localhost3000-process-from-windows-command-line – Sree
@coderhs 어떻게 확인할 수 있습니까? – Owen