-
Notifications
You must be signed in to change notification settings - Fork 3
Rails
Noel Welsh edited this page Dec 4, 2012
·
1 revision
There are two issues with using this client in a Rails application:
- Making sure EventMachine is started
- Tweaks dependent on your web server
If you're using Thin, you don't need to start EventMachine. For other servers place a call to Myna.run.get somewhere in your configuration (e.g. config/initializes/myna.rb).
For more details on running EventMachine see this blog post:
http://www.hiringthing.com/2011/11/04/eventmachine-with-rails.html
If you're using Thin you must
- run Thin in threaded mode. Pass the
--threadedcommand line parameter or setthreaded: truein your Thin YAML config file. - start Rails in
threadsafemode. In an appropriate configuration file (e.g.config/application.rb) include a call toconfig.threadsafe!.