async-rails icon indicating copy to clipboard operation
async-rails copied to clipboard

When using the em gems, this project will error out if using Rails 3.2 or greater

Open jbardrof opened this issue 12 years ago • 3 comments

When Rails is upgraded to 3.2.x, the following exception is thrown when starting Thin:

monitor.rb:185:in mon_enter': undefined methodlock' for nil:NilClass (NoMethodError)

jbardrof avatar Apr 09 '12 13:04 jbardrof

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', ]

jormon avatar Jun 01 '12 23:06 jormon

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 avatar Apr 03 '13 22:04 rdpoor

@rdpoor thanks for your comment! You just saved me a lot of time searching for a solution which is not described in API doc!

wrzasa avatar Feb 14 '14 12:02 wrzasa