Rails 2.3.8 Deprecation Warning

If you happen to come across the following deprecation warning:

DEPRECATION WARNING: Giving :session_key to SessionStore is deprecated, please use :key instead. (called from new at /Users/dshimy/.rvm/gems/ruby-1.8.7-p249/gems/actionpack-2.3.8/lib/action_controller/middleware_stack.rb:72)

Take a look at your config/environment.rb file for the following:

config.action_controller.session = {
    :secret_key    => '_sample_session',
    :secret        => '00000000000000000000'
}

and change it to:

config.action_controller.session = {
    :key    => '_sample_session',
    :secret => '00000000000000000000'
}
This entry was posted in Everything Else. Bookmark the permalink.

3 Responses to Rails 2.3.8 Deprecation Warning

  1. Thanks for posting this, you just saved me from a trip down the rabbit hole!

  2. Andrey says:

    May be :session_key change to :key ?

  3. Heber says:

    Thanks! It also helped me. :)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">