I just started a new rails app using
rails new myapp --database=postgresql
Then I generate some static pages:
rails g controller StaticPages home about
When I started the server and visit localhost:3000/static_pages/home, the PG::Error shows up:
PG::Error
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?
I didn't change anything else
Any idea how to make postgresql work?