how to build a weblog?

The first screencast on the rails website covers building a blog engine:

http://www.rubyonrails.org/screencasts

There are also a number of blogging apps available that are built with rails, the first two that come to mind are:

Mephisto: http://mephistoblog.com/

Typo: http://typosphere.org/

James.