原创作者: hideto   阅读:888次   评论:0条   更新时间:2011-05-26    
我们看看config/environment.rb文件,其中有以下一段:
  # Use the database for sessions instead of the file system
  # (create the session table with 'rake db:sessions:create')
  # config.action_controller.session_store = :active_record_store

Rails默认使用文件系统存储sessions信息,但是更快和更利于维护的方式是用ActiveRecord和数据库来存储,所以我们运行rake db:sessions:createrake db:migrate来创建sessions表并将config.action_controller.session_store = :active_record_store取消comment即可
评论 共 0 条 请登录后发表评论

发表评论

您还没有登录,请您登录后再发表评论

文章信息

Global site tag (gtag.js) - Google Analytics