T
Takao Ueda
A line starting with # in an Erb program is not
interpreted as a comment and displayed.
This is annoying, since the first line of a CGI program
must start with a #! line. Is the only solution to use
the Erb Class within a ruby program?
I use erb.bat in a Ruby 1.8 win32 installation.
A simple example is:
#!E:/ruby/bin/erb.bat
<%print "Content-type: text/html\r\n\r\n"%>
<HTML>
<HEAD>
<TITLE>Erb Test</TITLE>
<CENTER><H1>Erb Test</H1><b>
<%="The current time is #{Time.now}" %> </CENTER>
#This is a comment
</HEAD>
</HTML>
interpreted as a comment and displayed.
This is annoying, since the first line of a CGI program
must start with a #! line. Is the only solution to use
the Erb Class within a ruby program?
I use erb.bat in a Ruby 1.8 win32 installation.
A simple example is:
#!E:/ruby/bin/erb.bat
<%print "Content-type: text/html\r\n\r\n"%>
<HTML>
<HEAD>
<TITLE>Erb Test</TITLE>
<CENTER><H1>Erb Test</H1><b>
<%="The current time is #{Time.now}" %> </CENTER>
#This is a comment
</HEAD>
</HTML>