title: How do you spawn an EventMachine "inside" a Rails app?
body: <p>I've got a Rails application, and am looking to add some sort of WebSocket support to it.  From various googling, it appears that the best Ruby based WebSocket solution is <a href="https://github.com/igrigorik/em-websocket" rel="noreferrer">em-websocket</a> running on EventMachine.</p>
  
  <p>I was wondering if there was a way to "integrate" an EventMachine reactor into Rails?  Where do I put the initialization code?  Is this the proper way to accomplish this?</p>
  
  <p>I've seen <a href="https://github.com/igrigorik/async-rails" rel="noreferrer">this</a> example that falls back on Sinatra to do an EventMachine <code>GET</code> request, but that isn't quite what I'm looking for.</p>
  
  <p>Any help is appreciated.</p>