Thursday, April 23, 2009

Syntax Color Highlight

After many tries, finally I got it to work. This is a ruby code to print out a string.
I am using coderay to do color highlighting.

To install coderay

sudo gem install coderay

To generate html type:

coderay -ruby -page < yourRubyProgram.rb > yourRubyProgram.rb.html

puts "To seek elegance rather than luxury"


  1. Well done Luan. I'm going to have to give this a try on my code.

  2. Thanks Scott. Please let me know if you run into any issues.