On Aug 21, 2005, at 11:23 AM, Mark Volkmann wrote:
> This worked fine.  Then I decided I wanted to comment that out
> temporarily so I changed the line to this.
>
> <!-- The time in one hour will be <%= 1.hour.from_now %-->
>
> It complains that I have an unterminated string.
>
> Does ERb not know how to parse HTML comments?

ERB doesn't know anything about HTML, nor should it. I frequently  
write code like this:
     <!-- userid: <%=userid%> -->
as a way to put some dynamically-generated information in the HTML  
page that I can view in the source, but which will be hidden.


In short, what you wanted to do was either wrap a valid SGML/HTML  
comment around your ERB output:

<!-- <%= 1.hour.from_now %> -->

Or to simply modify your call so that the Ruby code ran, but was not  
output:

<% 1.hour.from_now %>