Heroku Rails 4无法连接到服务器:连接被拒绝 [英] Heroku Rails 4 could not connect to server: connection refused
问题描述
使用postgres。
无法推送。
试过这个没有任何运气:
config.assets.initialize_on_precompile = false
< blockquote>
----->为Rails资产管道准备应用程序
$ p $ 运行:rake资产:预编译
rake中止!
无法连接到服务器:连接被拒绝
服务器是否在主机127.0.0.1上运行并接受端口5432上的
TCP / IP连接?
接受的答案没有完全解决这个问题。我试图找到一个解决方案2-3小时没有成功,然后这工作:
在您的应用程序目录。
heroku labs:enable user-env-compile
它仍然是失败的?
heroku labs:禁用用户env编译
heroku labs:enable user-env-编译
然后它为我工作,只需要移除并重新执行即可。
在Rails 4中不再需要以下配置。编译资产必须没有它。
config.assets.initialize_on_precompile = false
Using postgres.
Haven't been able to push.
Tried this without any luck:
config.assets.initialize_on_precompile = false
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile rake aborted! could not connect to server: Connection refused Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432?
The accepted answer did not fully resolve this. I tried to find a solution for 2-3 hours without success, then this worked:
In your app directory.
heroku labs:enable user-env-compile
it is still failing?
heroku labs:disable user-env-compile
heroku labs:enable user-env-compile
Then it worked for me, just had to remove and do again.
The following config is no longer needed in Rails 4. Compiling assets must work without it.
config.assets.initialize_on_precompile = false
这篇关于Heroku Rails 4无法连接到服务器:连接被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!