async-rails
async-rails copied to clipboard
When using the em gems, this project will error out if using Rails 3.2 or greater
When Rails is upgraded to 3.2.x, the following exception is thrown when starting Thin:
monitor.rb:185:in mon_enter': undefined method
lock' for nil:NilClass (NoMethodError)
I saw this issue just now when trying to upgrade, I had to put this in my Gemfile:
gem 'em-synchrony', '~> 1.0.1', :require => [ 'em-synchrony', 'em-synchrony/mysql2', 'em-synchrony/activerecord', ]
Uh, this may be totally unrelated, but a search brought me here because I was getting the same error in my Ruby (non-Rails) app.
In my case, if you include MonitorMixin
, then your initialize() method must call super()
, otherwise @mon_mutex doesn't get initialized and leads to the observed error. Maybe you're seeing the same problem?
@rdpoor thanks for your comment! You just saved me a lot of time searching for a solution which is not described in API doc!