Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6803665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:22:19+00:00 2026-05-26T19:22:19+00:00

I have inherited a Rails 3 application with a cookie/session problem. Namely, something seems

  • 0

I have inherited a Rails 3 application with a cookie/session problem. Namely, something seems to be non-deterministically cleaning out all of the information in a session or cookie, every so often. I’ve reproduced the bug while watching in a console, and the application is sending back, every so often, an empty session cookie, clear as day. It’s nicely Base64 encoded as I would expect from a Rails cookie store; seems something is overzealous about deleting a session and/or cookies. Great, a bug, let’s fix it.

My question is: how do I debug a session or cookie problem in Rails 3? This application has a fairly sizable mound of dependencies and a sizable heap of its own code; I’d rather just observe the session and cookies, I don’t know of a good way to see what’s editing them. I can output what they are at the beginning of a request, and after one, but it’s all Very Rails Magical in the middle. I don’t even see how to overwrite the session setters, since it’s just a hash implemented in C. I did some ack’ing but it didn’t reveal anything amazing, and I know a lot of session magic happens in Rails itself so I doubt the actual session = {} is happening in the application.

Any ideas here? What can I monkeypatch, where can I plug in? Is there some test facility for sessions or cookies I’m unaware of?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:22:20+00:00Added an answer on May 26, 2026 at 7:22 pm

    I’ve done some Rails session and cookie debugging and it was really just a matter of opening up the Rails code and combing through it, putting debug statements in it, etc. It’s hard at first but you learn a lot and it becomes easier the next time. The Rails codebase is actually not bad once you get used to it.

    Maybe this hasn’t helped but will hopefully make you feel better if you have to dig in. With my poor luck, the next answer will be someone saying ‘oh yeah, just flip this configuration switch’. Fwiw, in my case Rails was doing nothing incorrect or bizarre with the session.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have inherited a poorly written web application that seems to have errors when
I have just inherited a medium sized Rails application and I want to try
I have inherited a rails application however the tables aren't using the standard rails
I want all my pages in my 2.3 Rails application to have the url
I have inherited an old crusty PHP application , and I'd like to refactor
I have inherited a VB6/Access application that we have developed and sold for many
We have a Rails app that has some pages that are available to all
I have a bunch of Rails 3.1 controllers which all have very similar testing
This seems like a classic rails situation: I want to have a my index
I am using Rails with MongoDB and MongoMapper. My problem is that I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.