Choose Your Tool
Picking a Ruby to JS mapping tool
dsl — A domain specific language, where code is written in one language and errors are given in another.
If you simply want to get a job done with a rich Ruby runtime and well-tested framework, and only use one of the many integrations that Opal provides, then Opal is the way to go.
Ruby2JS is for those that want to produce JavaScript that looks like it wasn’t machine generated, and want the absolute bare minimum in terms of limitations as to what JavaScript can be produced.
Try for yourself.
Compare with Opal.
And, of course, the right solution might be to use CoffeeScript instead. 😉