igrigorik / async-rails

async Rails 3 stack demo
465 stars 30 forks source link

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

Open jbardrof opened 12 years ago

jbardrof commented 12 years ago

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)

jormon commented 12 years ago

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

rdpoor commented 11 years ago

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?

wrzasa commented 10 years ago

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