Ruby on rails 部署到heroku时出错:rake资产:预编译PG::ConnectionBad:无法连接到服务器:连接被拒绝
在尝试git将应用程序推送到heroku时,我遇到了以下特定错误: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:
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在生产中加载了什么文件?