Forum: Ruby on Rails Efficient way of using multple Database

Posted by Karthikeyan A k (mindaslab)
on 2012-08-29 13:31
Is there a efficient way of using multiple databases in a Rails
application. I saw DB Charmer but, it did not work with 3.2.8 and even
in Rails 3.2.3 it gave problems.
Posted by Colin Law (Guest)
on 2012-08-29 13:38
(Received via mailing list)
On 29 August 2012 12:31, Karthikeyan A k <lists@ruby-forum.com> wrote:
> Is there a efficient way of using multiple databases in a Rails
> application. I saw DB Charmer but, it did not work with 3.2.8 and even
> in Rails 3.2.3 it gave problems.

Is using establish_connection inefficient?

Colin
Posted by Karthikeyan A k (mindaslab)
on 2012-08-29 14:54
Nope, what I am thinking is we need to migrate, the two databases need 
different set of tables. I am having a hard time.
Posted by Colin Law (Guest)
on 2012-08-29 15:04
(Received via mailing list)
On 29 August 2012 13:54, Karthikeyan A k <lists@ruby-forum.com> wrote:
> Nope, what I am thinking is we need to migrate, the two databases need
> different set of tables. I am having a hard time.

Ah, ok, a subject line and posting that asked for the best way to
handle migration of multiple databases might have been more useful.
Sorry I have never done that, but googling for
rails migrate multiple databases
yields some likely looking hits.

Colin
Posted by Karthikeyan A k (mindaslab)
on 2012-08-29 15:13
There is a gem called DB charmer, but does not work :-(
Posted by papadiddydoo dblok (david_c52)
on 2012-11-06 23:30
You can try the following, so far it has worked for me on rails 3.2.8

Grab the gem source code from
1.  git clone https://github.com/kovyrin/db-charmer.git

Modify the dependency inside the gemspec file, instead of <= 3.2.3 edit
to ~> 3.2.3
2.  vim db-charmer.gemspec
3.  s.add_dependency 'activesupport', '~> 3.2.3'
     s.add_dependency 'activerecord', '~> 3.2.3'

Build the Gem.

4.  gem build db-charmer.gemspec

Install the newly built gem.  (You should replace the old one after with
gem clean)

5.  gem install db-charmer-1.7.1.gem


It seems like the Ruby Core team changed the internals of ActiveRecord
in 3.2.4 and beyond, so charmer stopped working.

-David
Posted by Karthikeyan A k (mindaslab)
on 2012-11-07 10:25
We use Octopus https://github.com/tchandy/octopus , its quiet good 
enough
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.