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
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
2 Comments
andrefurquin
I didn't find this link that was already on Stack. It was very useful.
Nick M
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