Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9151185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:44:28+00:00 2026-06-17T11:44:28+00:00

is it possible to use 2 types of database in a Rails application? I

  • 0

is it possible to use 2 types of database in a Rails application?

I am using 2 databases – Postgres to store data which might not change much, and MongoDB
to store data which change dynamically.

is this valid approach? and is it possible to connect between these 2 databases and operate
in a single Rails application?

Please correct, if i am wrong.

regards,
Balan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:44:30+00:00Added an answer on June 17, 2026 at 11:44 am

    Found solution :

    We can use mongoid gem to achieve this.

    Steps to install

    1) Install mongoid by adding "gem mongoid" in Gemfile and running bundle command

    2) Generate mongoid configuration by typing "rails g mongoid:config", this will create a
    config file mongoid.yml near database.yml file, you can add the configuration to Mongo server
    in this file.

    Note : After adding Mongoid, all the models created will be created for MongoDB by default, you can specify --orm option to generate Models for Postgres.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to search through a MySQL database using blob data to find
I use RMySQL and a MySQL database to store my datasets. Sometimes data gets
Is it possible to use custom types in OpenCL kernel like gmp types (mpz_t,
Is it possible to use multiple header types in one document? For example: header(Content-type:
Can I use dynamic data type in WF 4.0? And if this is possible
I have a card-game application which makes use of Single Table Inheritance. I have
I am designing a table in the database which will store log entries from
Possible Duplicate: Types of HTTP authentication and how to design a secure database? I
Possible Duplicate: Rails ActiveRecord group_by & sum db results for use with Lazy HighCharts
I have a database table that essentially contains different types of things. I'll use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.