0

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.

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.

Logs: when a page is not found (when the routes are supposed to be accurate)

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

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'

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

3
  • 3
    Deleting and reasking a question because you didn't get an answer within an hour isn't wise.
    – Samuel
    Jun 1, 2010 at 17:31
  • 1
    Why did you delete your earlier question about this (2951279) only to ask it again? Jun 1, 2010 at 17:32
  • 2
    Secondly, asserting that rails is at fault with caching the routes is preposterous given the stack trace you provided. There is clearly something wrong with your code.
    – Samuel
    Jun 1, 2010 at 17:34

2 Answers 2

1

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

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.

1

Did you make sure you restarted your server (like apache, ngix or passenger)? Also, sometimes a browser can cache urls, just close your browser and reopen it, see if that fixes it.

Also, once in a blue moon, I'll forget to push the code to GIT and therefore production server doesn't get the latest code. Just check that your server actually has the code there.

1
  • i did restart all my servers, but the issue is that several of my mongrels did not restart. thanks for help! =)
    – meow
    Jun 4, 2010 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.