在生产中中断的Rails路由-怀疑对route.rb进行缓存 [英] Rails Routing Broken In Production - Caching of routes.rb suspected

查看:81
本文介绍了在生产中中断的Rails路由-怀疑对route.rb进行缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新:原来,这个问题是因为一半的杂种没有重新启动。谢谢大家的帮助!

Update: Turns out that this problem was because half my mongrel did not restart. Thanks all for help!

您好,我有一个紧急问题。本质上,我的路由在我的本地主机上工作。但是当我将其部署到生产环境时,这些路线似乎无法正常工作。

Hi folks, i have an urgent problem. Essentially, my routing works on my localhost. But when i deployed this to production, the routes does not seem to work correctly.

例如,给定一条新路线 / invites-有时我会得到一个404 ,有时会正常工作。

For example, given a new route "/invites" - sometimes i will get a 404, and sometimes it will work correctly.

我怀疑某个地方正在进行缓存,但是我不确定。

I suspect there is some caching going on somewhere, but i am not sure.

日志:当找不到页面时(假定路线是正确的)


处理UsersController#network
(对于2010年6月1日67.180.78.126
09:59:31)[GET]参数:
{ id => new}

Processing UsersController#network (for 67.180.78.126 at 2010-06-01 09:59:31) [GET] Parameters: {"id"=>"new"}

ActionController :: RoutingError(没有
路由将
/ comm / role_playing_games与{}匹配):

app / controllers / application_controller.rb:383:在
prev_page_label'

app / controllers / application_controller.rb:238:在
log_timed_info'

app / controllers / users_controller.rb:155:在
network'

app / controllers / users_controller.rb:151:在
network'

app / controllers / application_controller.rb:44:in
turn_on_query_caching'

app / controllers / application_controller.rb: 43:在
tur中n_on_query_caching'

app / controllers / application_controller.rb:42:in
turn_on_query_caching'

app / controllers / application_controller.rb:41:in
turn_on_query_caching'

app / controllers / application_controller.rb:40:in
turn_on_query_caching'

app / controllers / application_controller.rb:39:in
turn_on_query_caching'haml(3.0.6)
lib / sass / plugin / rack.rb:41:in`call'

ActionController::RoutingError (No route matches "/comm/role_playing_games" with {}):
app/controllers/application_controller.rb:383:in prev_page_label'
app/controllers/application_controller.rb:238:in
log_timed_info'
app/controllers/users_controller.rb:155:in network'
app/controllers/users_controller.rb:151:in
network'
app/controllers/application_controller.rb:44:in turn_on_query_caching'
app/controllers/application_controller.rb:43:in
turn_on_query_caching'
app/controllers/application_controller.rb:42:in turn_on_query_caching'
app/controllers/application_controller.rb:41:in
turn_on_query_caching'
app/controllers/application_controller.rb:40:in turn_on_query_caching'
app/controllers/application_controller.rb:39:in
turn_on_query_caching' haml (3.0.6) lib/sass/plugin/rack.rb:41:in `call'

渲染
/mnt/app/releases/20100524233313/public/404.html
(未找到404)

Rendering /mnt/app/releases/20100524233313/public/404.html (404 Not Found)


推荐答案

从您发布的内容来看,这绝对不是缓存或路由问题。

From the little you have posted, this definitely isn't a caching or routing problem.

听起来您正在尝试生成该人位于 ApplicationController 内部的上一页的链接,但是您遇到了一个错误。您必须从 application_controller.rb 中发布相关代码。

It sounds like you are trying to generate a link to the previous page the person was on inside ApplicationController and you have a bug with it. You will have to post the relevant code from application_controller.rb.

这篇关于在生产中中断的Rails路由-怀疑对route.rb进行缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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