我刚开始使用一个新的 Rails 应用程序
rails new myapp --database=postgresql
然后我生成一些静态页面:
rails g controller StaticPages home about
当我启动服务器并访问 localhost:3000/static_pages/home 时,PG::Error 出现:
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?
我没有改变其他任何东西
知道如何使 postgresql 工作吗?