Maybe I'm a little late for this, but for those looking to the future, this is a pretty simple solution. Add this to your environment configuration file:
Rails3App::Application.config.session_store :cookie_store, :key => '_rails3_app_session', :domain => :all
The important part of this is: domain =>: all, as it tells Rails to allow subdomains. Others suggested using: domain => ".mydomain.com", but: domain =>: everything does the job and does not require you to enter your domain name.
Note: if it does not work when you restart the server, you probably have a session_store.rb file in your initializer / folder that overrides it. Just change the line in this file or delete this file and move it to your configuration.
In addition, I had to specifically place the line in the production.rb file, because changing it in the session_store.rb file violated my development sessions (using the IP address).
Kelly Mar 21 '11 at 17:56 2011-03-21 17:56
source share