Over at my blog Jared White, Rubyist, I've written a tutorial that helps you get Opal cleanly set up in an existing Rails application. From the article:

ClearwaterVoltViennaLisso—these are all great ways to begin writing advanced client-side Ruby applications for the browser using Opal. But what if you already have a Rails app, in production, with tons of Javascript code and frameworks and build tools tightly integrated, and adding yet another major framework into the mix simply isn't realistic? How would you begin to "sprinkle" some Opal into your codebase? Does that even make sense?

Absolutely! A while back I was brought onto a project which was already a well-established Rails app with a bunch of frontend code written in Backbone. Now I could have gone nuts and ripped out all the Javascript in the project and replaced it with brand new Opal, but that would have been extremely poor planning on my part. As it turns out, however, over time that's pretty much where the project has ended up—there's almost no Backbone left and most frontend code is written in Opal now.

Here's how I facilitated this process.

Read the rest of the article here >