[英]Getting errror when trying to deploy rails 4 application on heroku
我正在尝试在heroku上部署Rails 4应用程序,但失败了并且出现了以下错误。 请尝试让我摆脱这个问题...
Bundle completed (42.53s) Cleaning up the bundler cache. -----> Writing config/database.yml to read from DATABASE_URL -----> 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
将以下内容添加到您的application.rb中:
config.assets.initialize_on_precompile = false
我首先设置了DATABASE_URL环境变量,然后再次尝试将代码再次推送到Heroku。 它像在Heroku端完成所有rake编译一样工作,因此不再与本地计算机进行raake编译@ ... / tmp / bin .....目录的连接。
我通过尝试这个东西得到了这个解决方案... :)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.