I\'m currently using Kramdown to generate HTML from Markdown in Ruby. I know that I can generate a latex file using kramdown and convert it to pdf usaing a command line util
Pandoc is a universal document converter which can convert documents in markdown, reStructuredText, textile, HTML, DocBook, or LaTeX to HTML, EPUB, Microsoft Word, TeX, PDF via LaTeX, Lightweight markup formats.
You can find it here. http://johnmacfarlane.net/pandoc/
Prawn: The Pure Ruby PDF Generation Library
http://www.rubyinside.com/prawn-ruby-pdf-library-987.html
The wkhtmltopdf
gem is also available: http://rubygems.org/gems/wkhtmltopdf
You can use https://github.com/walle/gimli
I made it just for this purpose. Though, I use textile. But gimli supports all formats supported by GitHub-Markup.