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

  • SEARCH
  • Home
  • 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 6001531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:50:52+00:00 2026-05-23T00:50:52+00:00

Someone asked this question here: How to load db:seed data into test database automatically?

  • 0

Someone asked this question here:

How to load db:seed data into test database automatically?

But their solution only works if you are going to run db:test:prepare which depends on a schema to load. Mongoid doesn’t have a schema file, and db:test:prepare doesn’t do anything and so this is not working. Is there another strategy that would work?

  • 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-05-23T00:50:52+00:00Added an answer on May 23, 2026 at 12:50 am

    Just as a FYI, I figured out a way to meet my requirements. I set up a database called seed like so in mongoid.yml:

     databases:
        seeds:
          database: seeds_db
          host: localhost
          port: 27018
    

    Then in my model I just have the datase use seeds like:

    class SeededData
      include Mongoid::Document
        set_database :seeds
    

    This actually works great because production, test, and development are all pulling from the seed database, which is what I want. And I’m never vacuuming out the data when running tests.

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

Sidebar

Related Questions

I found this on Google, click here , which someone asked a similar question,
This question was asked earlier by someone else but never answered: MKAnnotation - Map
I recently asked a question here, and someone provided this answer: private void button1_Click(object
I realize that this question has been asked and has been answered here but
This question was asked here but the issue wasn't resolved. Please see this jsfiddle
I know this question has been asked and answered here on StackOverflow.. but I
In this question someone asked for ways to display disk usage in Linux. I'd
I asked this question over in the actual tutorial, but not sure I'll get
I know this question has been asked a million of times here at stackoverflow,
I've asked about this earlier but the question itself and all the information in

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.