Blog posts in November 2008

Disco CPR

Turns out most people do CPR way too slowly – much less than the recommended 100 compressions per minute. The solution is officially rated AWESOME on account of the song title:

More

ERB comments in Ruby 1.8.7

After upgrading a server to Ubuntu Intrepid I found that the Rails site's layouts broke. The problem is this issue resulting from a ERB code change in Ruby 1.8.7: if you put a # Ruby comment in a one-line <% %> block, all the content up to the next %> that's on a subsequent line is ignored.

More

ERB comments in Ruby 1.8.7

After upgrading my server to Ubuntu Intrepid I found that this Rails site's layouts broke. The problem is this issue resulting from a ERB code change in Ruby 1.8.7: if you put a # Ruby comment in a one-line <% %> block, all the content up to the next %> that's on a subsequent line is ignored.

More

Media7 on Labour's flop campaign

In addition to a bunch of stuff about past spin doctors and an interesting segment about the Maori Party and what its members up north have been trying to do for the local communities, the election night special of Russell Brown Media7 show had some interesting discussion about the recent campaign.

More

Rails db:schema:dump after db:migrate:redo patch

I've submitted another patch to Rails for a minor-but-annoying bug – if you use db:migrate:redo you'll find that it does migrate correctly but the schema dump afterwards doesn't work, so db:test:prepare clones the wrong structure (for example).

More

db:schema:dump after db:migrate:redo Rails patch

I've submitted another patch to Rails for a minor-but-annoying bug – if you use db:migrate:redo you'll find that it does migrate correctly but the schema dump afterwards doesn't work, so db:test:prepare clones the wrong structure (for example). The patch fixes things so that second and subsequent db:schema:dump invocations work properly. Testing and +1s, as always, very welcome.

Permalink