2016-10-27 37 views
0

我的rails 5在本地和heroku都有效。但爲了提高性能,我遵循 heroku doc,它的工作很好(在heroku中),但Mac Book(2015)的操作系統10.12.1上的本地服務器出現連接錯誤,網絡未在數據庫連接時以日誌錯誤開始。puma for heroku在本地獲取錯誤

回答

0

在調試每一行之前添加到安裝Puma之前推到heroku。我發現這行需要從config/puma.rg中刪除

workers Integer(ENV['WEB_CONCURRENCY'] || 1) 

導致該問題。這確實不知道,因爲從Heroku的商務部只提及

Multi process mode does not work if you are using JRuby or Windows because the JVM and Windows do not support processes. Omit this line from your config if you are using JRuby or Windows. 

所以,我認爲無論是Mac的書或Mac OS 10.12.1應包括在列表中被省略。

刪除該行後。本地和heroku都可以恢復工作。