On Jan 26, 2006, at 9:57 AM, Jeremy Kemper wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Jan 26, 2006, at 8:40 AM, Duane Johnson wrote:
Jamis Buck and I had a few ideas tonight that would each take care of the CgiRequest bug where switching between Rails apps that have different classes (models) stored in the session causes the whole app to crash without a trace. Of course, the problem is only present when using the FileStore to store session data, since if the sessions are being stored in the DB, there shouldn't be any conflict between apps.

The rubysess. file prefix and cookie names are configurable so the app generator may:

  class ApplicationController < ActionController::Base
session :prefix => '<%= @app_name %>.', :session_key => '<%= @app_name %>'
  end


True. However, if a controller does not extend ApplicationController (and it happens--Basecamp has one of these) then it doesn't get that functionality. I think Duane's suggestion of a tmp/ directory under RAILS_ROOT has some real merit. It does add one more directory to the app structure, but it gives us a good place to store those transient files (like sockets, and session files). It also gives us a way to prevent the white-screen-of-death without requiring existing apps to make any changes.

It could even be made such that the tmp/ directory is created on- demand, rather than auto-generated, which would reduce the perceived clutter when an app is first generated. (It would actually have to be created on-demand for existing apps to work with this solution.)

- Jamis

_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to