Connecting to multiple databases, mysql win32 gem problem

I am trying to connect to multiple databases, and have setup an abstract
with a call to establish_connection:

class TestBase < ActiveRecord::Base
self.abstract_class = true

:adapter => “mysql”,
:host => “host”,
:username => “user”,
:password => “pass”,
:database => “db”

class Table < TestBase


I get an error when trying to use the new connection:
Mysql::Error: Lost connection to MySQL server during query:

So, I installed the mysql win32 gem:
gem install mysql

and now I get an error on any page,
undefined method `each’ for #Mysql:0x3883f08

Has anyone figured out how to fix this (besides uninstalling the gem)?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs