Our Blog. We have some things we'd like to share.

Cleaning Up Rails Sessions, Revisited

In an earlier post, we detailed a method for removing stale Rails session files. In more recent version of Rails, there is a Rake task built in for this administration task.

rake tmp:sessions:clear # Clears all files in tmp/sessions

Tagged:

One Response to “Cleaning Up Rails Sessions, Revisited”

  1. 1

    August 16th, 2007 @ 5:37 pm Brian McQuay responded:

    Thanks for the tip. I wonder why these aren’t cleaned up automatically. I’m just going to setup a cron job to run this command to prevent things from getting out of hand.

Leave a Response

Cincinnati 513.298.1865

Virginia 7875 Promontory Court Dunn Loring, VA 22027

Kentucky 12910 Shelbyville Road Suite 310 Louisville, KY 40243 502.245.6756

© 2010 Mission Data