0

Is it possible to have Postgresql and MongoDB in the same project ? I would like to be able to use generators for both as well.

1 Answer 1

4

Yes. You can have multiple database.yml files, etc.

There are a number of articles about getting multiple dbs set up in Rails. http://www.thegreatcodeadventure.com/managing-multiple-databases-in-a-single-rails-application/ http://www.ostinelli.net/setting-multiple-databases-rails-definitive-guide/

In terms of using generators this post should help: Rails 4: Use MySql and MongoDB together

Sign up to request clarification or add additional context in comments.

2 Comments

I didn't find this link that was already on Stack. It was very useful.
Could you also explain how to deal with migrations and optimizing number of connections in the pool to avoid duplicates due to misconfigured models. Cheerios

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.