Where is the database file? Rails
postgresql, ruby, ruby-on-rails
Solution
The database configuration file is in `config/database.yml`.
If you're using `sqlite`, the database itself is in `db/` folder.
You may want to read Getting Started with Rails for more info.
Edit: For PostgreSQL, you can execute `SHOW data_directory` in `psql` to find the database files location.
Edit (CR): Note that you can't just copy the data directory though. Read the PostgreSQL manual on backup and restore for how to copy your database correctly.
Source: https://askubuntu.com/questions/197626/where-is-a-postgresql-9-1-database-stored-in-ubuntu-12-04
Problem
I'm newbie in Rails and I just finished one part of the app I'm developing and I'm wondering where is the database file, I cannot found it on the rails.root directory. Does anyone has the answer? Thanks in advance. Edit: I'm searching the file not the configuration file and I'm using PostgreSQL and Ubuntu