tags:

views:

55

answers:

2

Does anyone have or know of a Ruby script that converts text to html?

Example:

I have a file that contains the following text:

Host Name

Info1
Line1
Info2
Line2

I want to have ruby convert it to the following html output

Host Name

Info1
Line1
Info2
Line2

I tried running RedCloth but got the following error:

The program can't start because msvcrt-ruby18.dll is missing

Thanks

Thanks

+2  A: 

That depends upon what you mean by "text to HTML." There are several "web text generators" that convert easy-to-read free text with minimal markup (asterisks to indicate bold, double-spaced paragraphs get surrounded in <p> tags, etc). The most common, for Ruby, are Redcloth, which implements Textile free text, and Bluecloth, which implements Markdown.

Elf Sternberg
An introduction to Markdown: http://daringfireball.net/projects/markdown/basics
Douglas
Thanks for the recommendations, I tried running RedCloth, but got the following error: program can't start because msvcrt-ruby18.dll is missing
nomoreflash
A: 

The error code you describe is discussed in this answer.

philosodad