Create HTML files using RUBY

On Nov 5, 1:39 am, Gregory B. [email protected] wrote:

All it means is packaging someone elses source with yours and adding
it somewhere in the loadpath. No framework needed.

I don’t think the OP said he couldn’t use frameworks. I think he can’t
use a web framework, probably because he wants something more
lightweight.

I second the HAML or ERb suggestion.

http://haml-lang.com/

David

Krithika San wrote:

I cant try it for next few days, there is some issue with my computer.

Then try it here:
http://tryruby.sophrinix.com/

Krithika San wrote:

I am told to create static HTML page and asked to write something like
what Marnen has quoted. External library and CGI script are also not
required to use.
So let me try what Marnen has mentioned.

Could you tell me if I can do something like this

file_html = File.new(“sample.html”, “w+”)
file_html.puts “”
file_html.puts “This is a color

file_html.puts “This is
yellowww”
file_html.puts “”
file_html.close()
system(“start sample.html”)

Why are you asking? In the time it took you to type that, you could
have executed it and inspected the result.

(BTW, your HTML code is of really poor quality.)

Thanks,
Krithika

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]