I just pulled the latest commits from Rails master and it seems this is
fixed now. You now need to define the relevant configuration like this:

Rails.application.config.session_store :cookie_store, :key =>
'_appname_session'
Rails.application.config.secret_token = 'secret'

Omit 'Rails.application.' if you're defining in application.rb.

On Mon, Apr 5, 2010 at 3:11 PM, [email protected] <
[email protected]> wrote:

> In order to debug I changed the SignedCookieJar class initializer to
> include a log statement.
>
>  def initialize(parent_jar, config = {})
> --> Rails.logger.debug "CONFIG: #{config.inspect}"
>    raise 'Missing cookie signing secret' if
> config[:signing_secret].blank?
>    @parent_jar = parent_jar
>    @config = config
>    @verifier =
> ActiveSupport::MessageVerifier.new(config[:signing_secret])
>  end
>
> The output in the logfile is
> CONFIG: {}
>
> I have a file config/initializers/cookie_verification_secret.rb with a
> content of
>
> Rails.application.config.cookie_secret = '...(secret)...'
>
> Rails 3 Beta2+ (it's the latest from github) bug?
>
>
>
> > <[email protected]> wrote:
> > > It seems obvious, but I could not find anything using Google. I DID
> > > find articles likehttp://
> m.onkey.org/2010/2/5/signed-and-permanent-cookies-in-rails-3,
> > > however, that doesn't help - I KNOW what it's supposed to be used for,
> > > but I cannot figure out how to SET the secret.  I have a file config/
> > > initializers/cookie_verification_secret.rb which sets
> > > Rails.application.config.cookie_secret, which I thought should be
> > > what's asked for? Anyway, tried to set
> > > Rails.application.config.signing_secret in the same file, which didn't
> > > help.
> >
> > > Grep-ing through all of the rails3 sources shows file actionpack/lib/
> > > action_controller/metal/cookies.rb, which says config.cookie_secret IS
> > > the signing_secret.
> >
> > > 1) In that case, is it really necessary to have two names for one and
> > > the same thing?
> >
> > > 2) Any idea why I get the app error with this message? I'm in the
> > > process of changing from authlogic to devise, but until a few minutes
> > > ago I at least got the homepage. Not sure how devise could be the
> > > culprit but maybe it is.
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Core" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rubyonrails-core%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-core?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to