【发布时间】:2015-03-27 16:56:28
【问题描述】:
在尝试将应用程序 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_on_precompile = false
但是尝试在heroku中部署时仍然出现错误...
知道我做错了什么吗?
谢谢!
P.S:我正在使用带有 rails 4.2.0 的 spree 3.0.0
【问题讨论】:
-
可能你在添加 config.assets.initialize_on_precompile = false 后忘记提交到 git
-
生产环境中加载的 gemfile 是什么?
标签: ruby-on-rails git heroku deployment