Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/54.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 部署到heroku时出错:rake资产:预编译PG::ConnectionBad:无法连接到服务器:连接被拒绝_Ruby On Rails_Git_Heroku_Deployment - Fatal编程技术网

Ruby on rails 部署到heroku时出错:rake资产:预编译PG::ConnectionBad:无法连接到服务器:连接被拒绝

Ruby on rails 部署到heroku时出错:rake资产:预编译PG::ConnectionBad:无法连接到服务器:连接被拒绝,ruby-on-rails,git,heroku,deployment,Ruby On Rails,Git,Heroku,Deployment,在尝试git将应用程序推送到heroku时,我遇到了以下特定错误: remote: Running: rake assets:precompile remote: PG::ConnectionBad: could not connect to server: Connection refused remote: Is the server running on host "127.0.0.1" and accepting remote:

在尝试git将应用程序推送到heroku时,我遇到了以下特定错误:

remote:        Running: rake assets:precompile 
remote:        PG::ConnectionBad: could not connect to server: Connection     refused
remote:        Is the server running on host "127.0.0.1" and accepting
remote:        TCP/IP connections on port 5432?
我试着按照文章的步骤:
https://devcenter.heroku.com/articles/rails-asset-pipeline#troubleshooting

我的资产在本地编译,不需要连接数据库

我还添加了
config.assets.initialize\u on\u precompile=false

但是当尝试在heroku中部署时仍然会发生错误

知道我做错了什么吗

谢谢


备注:我正在使用spree 3.0.0和rails 4.2.0为您的应用程序在heroku中创建新的数据库:
heroku插件:创建heroku postgresql


然后尝试git push to heroku

也许在添加config.assets.initialize\u on\u precompile=false后您忘记了提交git在生产中加载了什么文件?