From: John Joyce Date: 2007-08-13T17:26:16+09:00 Subject: Re: Can .rhtml files include text from .txt or .html file? On Aug 12, 2007, at 8:36 PM, Gregory Brown wrote: > On 8/12/07, Sfdesigner Sfdesigner > wrote: >>> Then http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/ >>> 245920 >>> may >>> hopefully be helpful. >>> >>> Felix >> >> Thanks! I got this to work >> >> <% print IO.read("header.html") %> > > You can also do > > <%= IO.read 'header.html' %> > > no need for the print. > One tip though, you don't have to use rhtml as the file extension to use ERb. It's really a Rails thing to require that extension. eruby itself can process text from just about whatever you use it for. Truth is, file extensions don't really mean much at all in many cases. Apache does care about them though, and you would need to edit httpd.conf (or one of the other conf files) or htaccess to tell it what file extensions are files that should be sent to Eruby for processing first.