igrigorik/em-synchrony — Issue #88: Can't establish connection with adapter em_mysql2
Author: mbouza
Created: 2011-11-30 12:16:00+00:00
State: open

Hi

I am trying to establish an asynchronous connection to mysql with the following code:

require 'em-synchrony'
require 'em-synchrony/mysql2'
require 'em-synchrony/activerecord'

ActiveRecord::Base.establish_connection(
:adapter => 'em_mysql2',
:database => 'mydb',
:username => 'root',
:password => '123456',
:host => 'localhost')

But I get the following error:

gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:71:in `rescue in establish_connection': Please install the em_mysql2 adapter: `gem install activerecord-em_mysql2-adapter` (cannot load such file -- active_record/connection_adapters/em_mysql2_adapter) (RuntimeError)

I am using em-synchrony 1.0.0, mysql2 0.3.10. What is it that I am doing wrong? Thanks for your help.