# Potential bug in radiant:update on github edge

**URL:** <https://www.ruby-forum.com/t/potential-bug-in-radiant-update-on-github-edge/143961>\
**Category:** Radiant CMS\
**Created:** [July 24, 2008, 6:50am UTC](https://www.ruby-forum.com/t/potential-bug-in-radiant-update-on-github-edge/143961 "2008-07-24T06:50:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubella](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/6a8cbe/32.png) [@rubella](https://www.ruby-forum.com/u/rubella)\
**Post date:** [July 24, 2008, 6:50am UTC](https://www.ruby-forum.com/t/potential-bug-in-radiant-update-on-github-edge/143961/1 "2008-07-24T06:50:25Z")

</div>

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 doesne$B!Ge(Bt with a instance generated from a github  
clone (ie clone then bin/radiant -d sqlite3)

On Jul 23, 2008, at 2:49 PM, Alex W. 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 ite$B!Ge(Bs 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 e$B!He(BCGI::Session::CookieStore::TamperedWithCookiee$B!Ie(B).  
‘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 selfe$B!De(B 😉

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]

> <https://github.com/radiant/radiant/commit/318687e9be167f5b6549a28557ea039bd4651241>

[2]

> <https://github.com/radiant/radiant/blob/master/lib/generators/instance/templates/instance_environment.rb>

[3] [http://pastie.textmate.org/239873](http://pastie.textmate.org/239873)

---

<div class="post-metadata">

**Author:** ![rubella](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/6a8cbe/32.png) [@rubella](https://www.ruby-forum.com/u/rubella)\
**Post date:** [July 24, 2008, 3:43pm UTC](https://www.ruby-forum.com/t/potential-bug-in-radiant-update-on-github-edge/143961/2 "2008-07-24T15:43:46Z")

</div>

Yeah, the generator is good about interpreting the ERb but I haven’t  
added it to the update task yet. We’ll definitely fix that before 0.6.8  
release.

Sean
