---
title: Rails Session Stores
teaser: How to switch to an alternative Rails session store.
tags: web,rails
author: Jon Yurek
published_on: 2005-11-15
---

For reference, since it's not specifically in the `environment.rb` file and
apparently no one else on the net found it necessary to place on a
Google-accessible page, the proper syntax for switching from file-based session
stores to <abbr title="Distributed Ruby">DRb</abbr> session stores in Rails
(0.14 and onwards) is `config.action_controller.session_store = :drb_store`
inside the `Rails::Initializer` block.

From what I can tell, from the contents of the ActionPack's
`lib/action_controller/session/` directory, the other options are
`:active_record_store` and `:mem_cache_store`. This is actually confusing, since
I thought the file store class would have been there, but it's not.
