From: Mark Hubbart Date: 2004-04-16T06:18:37+09:00 Subject: Re: cgi font not working (ruby 1.8) On Apr 15, 2004, at 8:48 AM, tigre@digital-style.org wrote: > Hi all, i'm relative new to ruby. I've been using CGI class to make a > simple > script, but what i found when using cgi.font the next error: > > ./pass.cgi:28: undefined method `font' for # > (NoMethodError) > > Isn't font implemented? If you want to use the font tag, you must use html3, not html4; W3C either deprecated or removed it in the html4 spec. irb(main):040:0> c=CGI.new('html4') [...] irb(main):041:0> c.font{"test"} NoMethodError: undefined method `font' for # from (irb):41 irb(main):042:0> c=CGI.new('html3') [...] irb(main):043:0> c.font{"test"} => "test" But it would be a better choice to use styles, since the font tag is considered somewhat of a no-no these days. You might want to try this instead: irb(main):044:0> c=CGI.new('html4') [...] irb(main):045:0> c.span('style'=>"font-family:Garamond,Georgia,'Times New Roman',serif"){"text goes here"} => "text goes here" cheers, --Mark