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 8202483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:12:04+00:00 2026-06-07T07:12:04+00:00

I used to develop on SQLite3 and deploy on PostgreSQL . However, after this

  • 0

I used to develop on SQLite3 and deploy on PostgreSQL. However, after this question I realised the importance of having the same database for development and production.

After many problems, I finally managed to install the PostgreSQL on my Mac OS X Lion 10.7.4. However, I am still facing some problems:

  • Using SQLite3 the databases’ path is defined on the database.yml, which rails automatically creates within each new project.
  • Using PostgreSQL the database name is defined on the database.yml, which rails doesn’t create automatically.

My question:

Shall I create a new database for each new project or shall I change the database.yml to include the same database for all projects?

I saw people saying that each user in a computer should have one database, when using PostgreSQL.
Well, if the best practice is to create one database for each project (which I hope so)…

There is any way to configure rails to create the new database automatically within each new project?

  • 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-07T07:12:06+00:00Added an answer on June 7, 2026 at 7:12 am

    Problem solved:

    I have followed this tutorial and I could finally solve the problem.

    I have created a new user for my postgreSQL called user1 without any password, so each time I create a new project I just need to change the database.yml for the below:

    development:
      adapter: postgresql
      encoding: unicode
      database: newproject_development
      pool: 5
      username: user1 #I am changing this line
      password:
    
    test:
      adapter: postgresql
      encoding: unicode
      database: newproject_test
      pool: 5
      username: user1 #I am changing this line
      password:
    
    production:
      adapter: postgresql
      encoding: unicode
      database: newproject_production
      pool: 5
      username: user1 #I am changing this line
      password:
    

    As the the user1 doen’t have any password, now I can just create the tables using the Rails rake.

    rake db:create:all
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How diferent is Java used in Android apps development from Java used to develop
Easy question. I used to develop websites back in the days of classic ASP,
I have a question about mobile application development. I'm wanting to develop an application
I used to develop a habit in Eclipse to use Error List to check
What languages can be used to develop for the iPhone? I know, I know:
I develop a critical application used by a multi-national company. Users in offices all
I used the cocoa of MAC to develop a plugin with safari , I
I have used sendinput() function and windows keyboard hooks to develop a custom keyboard
I need to develop a point of sale app that will be used on
I am planning to use vaadin to develop internal application, which will be used

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.