升级到 Rails 5 后,应用不再接收请求 [英] After upgrade to Rails 5, app no longer receiving requests

查看:27
本文介绍了升级到 Rails 5 后,应用不再接收请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将我的一个应用程序更新到了 Rails 5,并将 Ruby 版本也升级到了 2.3.1.该应用在 Rails 5 升级之前也已经使用了 Puma,并部署在 Digital Ocean 液滴上.

I updated one of my apps to Rails 5 and upgraded the Ruby version to 2.3.1 as well. The app already used Puma prior to the Rails 5 upgrade as well and was deployed on a Digital Ocean droplet.

当我在本地启动 rails server 时,我在 Rails 日志中得到了正常的输出,我在下面复制了该日志.

When I start rails server locally, I get the normal output in my Rails log, which I've copied below.

=> Booting Puma
=> Rails 5.0.0 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
[14669] Puma starting in cluster mode...
[14669] * Version 3.4.0 (ruby 2.3.1-p112), codename: Owl Bowl Brawl
[14669] * Min threads: 5, max threads: 5
[14669] * Environment: development
[14669] * Process workers: 2
[14669] * Preloading application
[14669] * Listening on tcp://localhost:3000
[14669] Use Ctrl-C to stop
[14669] - Worker 1 (pid: 14684) booted, phase: 0
[14669] - Worker 0 (pid: 14683) booted, phase: 0

在我看来一切都很正常.当我访问 localhost:3000 时,浏览器有一个无限期挂起的待处理请求.Rails 日志中没有确认收到任何请求的进一步活动.

Everything looks normal to me. When I visit localhost:3000, the browser has a pending request that is pending indefinitely. There is no further activity in the Rails log acknowledging that any request is being received.

有没有人遇到过这种问题,或者知道任何潜在的原因?

Has anyone encountered this type of issue, or know of any potential causes for that?

推荐答案

已解决此问题,并由遇到相同问题的 @marvindanig 确认,需要清除 'tmp' 文件夹.rails 中有一个 rake 任务可以这样做...

Resolved this issue, and confirmed by @marvindanig who was experiencing the same issue, that the 'tmp' folder needed to be cleared. There is a rake task in rails to do so...

rake tmp:clear

这篇关于升级到 Rails 5 后,应用不再接收请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆