アプリが Heroku に正しくデプロイされるように、SQLite から Postgres に移行しようとしています。しかし、私は運がありません。
rake aborted!
PG::ConnectionBad: 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?
私はPostgresを初めて使用しますが、出くわしたすべての提案を試してみましたが、うまくいきませんでした。これが私のdatabase.yamlファイルです:
default: &default
adapter: postgresql
encoding: unicode
pool: 5
timeout: 5000
host: localhost
username: postgres
password: postgres
development:
<<: *default
database: app_development
test:
<<: *default
database: app_test
production:
<<: *default
database: app_production
Postgres リストにあるように空のデータベースが正しくセットアップされていると思いますが、rake db:migrate を実行すると失敗します。
どんな助けでも大歓迎です。