puma for heroku在本地获取错误

时间:2016-10-27 12:33:40

标签: heroku puma

我的rails 5在本地和heroku都有效。但是为了表现我跟随 heroku doc并且它工作得很好(在heroku中)但是Mac OS(2015)上的本地服务器与OS 10.12.1有连接错误,网络无法启动,数据库连接时出现日志错误。

1 个答案:

答案 0 :(得分: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 Book或Mac OS 10.12.1应该包含在列表中以便省略。

删除该行后。本地和heroku都恢复正常工作。

相关问题