2016-05-18 34 views
1

development.sqlite3ファイルからHerokuアプリケーションにデータベースをプッシュしようとすると、次のエラーメッセージが表示されました:pg_dump:データベースへの接続「開発」が失敗しました:サーバーに接続できませんでした:接続が拒否されました

pg_dump: [archiver (db)] connection to database "development" failed: 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? 
pg_restore: [archiver] input file is too short (read 0, expected 5) 
psql: 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? 
! Heroku client internal error. 
! Search for help at: https://help.heroku.com 
! Or report a bug at: https://github.com/heroku/heroku/issues/new 

私はHerokuには新しく、これを理解することはできません。それは私が見落としている簡単なものだと思っています。

答えて

0

まず、sqliteは本番環境で使用するためのものではありません。実際、Herokuはsqliteの使用をサポートしていないので、Herokuでアプリを使用する場合は、Postgresに切り替える必要があります:https://devcenter.heroku.com/articles/getting-started-with-rails4#write-your-app

あなたのherokuアプリは、デフォルトでPostgresによって利用され、sqliteでは使用されていないポート5432に接続するためです。しかし、ローカルホストに接続するPGサーバがないので、あなたはそのエラーで失敗してしまいます。

関連する問題