# Problem with magic muticonnections

**URL:** <https://www.ruby-forum.com/t/problem-with-magic-muticonnections/188514>\
**Category:** Rails\
**Created:** [May 13, 2010, 7:42am UTC](https://www.ruby-forum.com/t/problem-with-magic-muticonnections/188514 "2010-05-13T07:42:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![preksha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5daacb/32.png) [@preksha](https://www.ruby-forum.com/u/preksha)\
**Post date:** [May 13, 2010, 7:42am UTC](https://www.ruby-forum.com/t/problem-with-magic-muticonnections/188514/1 "2010-05-13T07:42:03Z")

</div>

Hi all,

I am using magic multi-connections for the database connectivity of  
two application…I can find the records for the other table but I am  
getting the error if the table name in both the database is same…

I have two databases and I have users table in both the database and i  
tried to fire simple query in development environment.

```
@users = DevelopmentClone1::User.find(:all)

```

But I am getting the following error…

NameError (uninitialized constant User::Newslettersubscription):  
/usr/local/lib/ruby/gems/1.8/gems/magic\_multi\_connections-1.2.1/lib/magic\_multi\_connections/connected.rb:60:in  
`create_class' /usr/local/lib/ruby/gems/1.8/gems/magic_multi_connections-1.2.1/lib/magic_multi_connections/connected.rb:51:in`each’  
/usr/local/lib/ruby/gems/1.8/gems/magic\_multi\_connections-1.2.1/lib/magic\_multi\_connections/connected.rb:51:in  
`create_class' /usr/local/lib/ruby/gems/1.8/gems/magic_multi_connections-1.2.1/lib/magic_multi_connections/connected.rb:30:in`const\_missing’  
app/controllers/home\_controller.rb:46:in `index’

And if I fire the query “@events = DevelopmentClone1::Event.find(:all)”  
then it works fine.

So whats the problem that I can’t understand…

So can any one please help me for this??

Thanks in advance,  
Preksha P…
