Opal
Opal is a Ruby to JavaScript source-to-source compiler
... directly from your HTML (and from Opal) files without needing any other building process. Opal.compile is a simple interface to just compile a string of Ruby into a string of JavaScript code. See the website for more detailed instructions and guides for Rails, jQuery, Sinatra, rack, CDN, etc.