Typo Blog Code Updated

Posted by JD 01/05/2010 at 15:33

So, I found a few free minutes today and decided to upgrade this blog to the latest release. This was a security related update, seems Typo had a few security vulnerabilities. As usual, things mostly went fine following the instructions provided by the upgrade web page. Mostly.

Overview of the Steps

gem outdated
gem update
gem update
cd /var/www/typo
./STARTUP stop
cd ..
cp -rp typo typo-5.3
gem install typo
cd /var/www/typo/vendor/gems
rm -rf *
gem install htmlentities calendar_date_select coderay
cd /var/www/typo
typo install /var/www/typo
rake RAILS_ENV=production db:migrate
./STARTUP restart

Ok, so that got a running and updated typo system. Nice. Some of the commands show where issues were encountered and what the corrective action required was. IRL, I looked at a few log files, removed a few files and directories, cleared the cache and restarted the typo server over a few times. Because I didn’t completely wipe the prior installation, many things just sorta kept working.

How to clear the Typo cache?

  1. Remove the main index file
    cd /var/www/typo/public/
    rm /var/www/typo/public/index.html
    cd /var/www/typo
  2. Sweep the cache using rails
    rake sweep_cache

A few things that needed to be fixed.

  1. Theme – in the GUI, I swapped a few themes around, but ended up with Scribbish. The old theme from last year has a search bug that isn’t fixed yet. Booo.
  2. AWStats – I manually forced awstats.js to be called in the old theme by including the javascript in the default layout file. This was wiped during the upgrade and needed to be re-introduced.

AWstats Fix

Edit /var/www/typo/themes/scribbish/layouts/default.html.erb and add this just before the body-close.
<script language=javascript src="/js/awstats_misc_tracker.js"></script> <noscript><img src="/js/awstats_misc_tracker.js?nojs=y" height=0 width=0 border=0 style="display: none"></noscript>

Obviously, for that to work, /var/www/typo/public/js/awstats_misc_tracker.js must exist. Also, it would be best if you’d already had a working awstats installation.

This blog runs under Ubuntu LTS x64 with the Xen hypervisor, quite nicely thank you. Sadly, the VM requires much more RAM than it really should, but by giving it 1GB RAM, the gem updates were all fairly painless. I know that 512MB of RAM will cause the update process to hang. Boo on ruby and gem development.

Trackbacks

Use the following link to trackback from your own site:
https://blog.jdpfu.com/trackbacks?article_id=399