Hi All,

Summary: freezing a current project to github edge then doing 'rake radiant:update' generates a config/environment.rb that contains the uninterpreted :secret code - apparently this would be a bug in radiant:update. This also happens with freezing a fresh 0.6.7 to github edge, but doesn’t with a instance generated from a github clone (ie clone then bin/radiant -d sqlite3)

On Jul 23, 2008, at 2:49 PM, Alex Wayne wrote:

This has been added to Radiant edge. If you freeze your vendor/ radiant to edge you should have a new defaults.page.filter config setting you can set to whatever you like.

I froze to Rev 881, but it lacks the changes of the defaults.page.filter patch[1] from a month ago. Looks like svn is dead huh. So it’s off to github and a clone into radiant/vendor/ radiant. However doing

    rake radiant:update

gave me a config/environment.rb that has this on line 42:

  config.action_controller.session = {
    :session_key => '_radiant_session',
:secret => <% require 'digest/sha1' -%>'<%= Digest::SHA1.hexdigest("--#{app_name}--#{Time.now.to_s}-- #{rand(10000000)}--") %>'
  }

which is straight out of the generator[2]. Of course trying 'rake db:update' after that fails.

My workaround was to copy my old :secret key from environment.bak and delete the _radiant_session cookies in my browser (I got the error “CGI::Session::CookieStore::TamperedWithCookie”). 'rake db:update' then worked as expected. You could also generate a new key using irb[3]

Awaiting flames and being told to fix it my damn self… ;-)

peace - oli

PS the download page is still not in the wiki, and could do with info on getting edge from github. I also seem to need to do 'rake production db:migrate' over the mentioned 'rake db:migrate', which would also be worth noting.


[1] 
http://github.com/radiant/radiant/commit/318687e9be167f5b6549a28557ea039bd4651241
[2] 
http://github.com/radiant/radiant/tree/master/lib/generators/instance/templates/instance_environment.rb
[3] http://pastie.textmate.org/239873
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to