From: Brian Candler Date: 2004-11-01T18:56:34+09:00 Subject: Re: erb: undefined local variable > This is my first time into the world of Ruby. I was interested in erb and so > I copied part of a code fragment from the PickAxe book Unfortunately, Amazon haven't dispatched mine yet, so I can't see exactly the example you are copying. erb suffers from poor documentation. One way to make your example work is by using a different syntax: Eruby Example

Enumeration

However, the source of erb.rb is there to be hacked... poking around, it looks like you must put the percent as the *first* character of the line. So your code works if you remove the spaces at the front of those lines: Eruby Example

Enumeration

Whether it's supposed to be possible to have the percent further indented, I cannot tell. The erb.rb code is completely uncommented; there are a bunch of things like 'trim modes' but I cannot work out what they are supposed to do. Regards, Brian.