title: Rails sessions not saving
body: <p>I'm in the process of upgrading a Rails app from Rails 2 directly to Rails 4.   I'm using the new <code>/config/initializers/session_store.rb</code> file, with CookieStore, but for some reason my sessions are not saving.</p>
  
  <p>When trying to do something along the lines of
  <code>render :text =&gt; "#{request.session_options[:id]}"</code>
  I get a new session ID every refresh.</p>
  
  <p>I've tried on different browsers, and all should be accepting cookies.  </p>
  
  <p>I have no idea what's going on.  Why won't these sessions persist?!</p>
  
  <p><strong>Edit:</strong> thank you all for your suggestions.  Here's a little more information, and a few things I've noticed:</p>
  
  <ul>
  <li>First, about my set up -- I'm running the server with Rails 4/Ruby 2 through RVM on an Ubuntu VM on my Windows 7 machine.  </li>
  <li>Although I'm upgrading from Rails 2, that only really applies to the models/controllers/views/etc -- I generated a new Rails 4 application for all of the supporting infrastructure.</li>
  <li>I created another application on the same VM that JUST sets a session and then displays, and that works fine.</li>
  <li>What the session is storing varies slightly depending on what the user is doing, but usually it holds simply a user id (just an integer), and occasionally a little more -- (i first noticed this manifesting itself while trying to pass an OAuth token from the OAuth gem.)  </li>
  <li>I've noticed that if the VM's system clock falls behind the Windows 7 host machine clock, the user id sessions hold.  That causes other problems, especially with OAuth, but there seems to just be a time issue somewhere.  I've tried doing things like removing the time zone from my environments/development.rb, but that did not help.</li>
  </ul>