Reputation: 3057
I want to migrate from sqlite3 to postgresql. After doing search I found that I should change my database.yml to somthing like that:
adapter: postgresql
encoding: unicode
database: [insert your dev database name]
pool: 5
username: [insert your user name]
password:
But I don't know what to provide in place of database, username and password. Because i don't remember creating any of them. I just created my rails app and migrations , and thats it.
Upvotes: 2
Views: 61
Reputation: 9988
To configure your rails project with postgres database
do the below steps.
provide your database details in the database.yml
file
eg:
development:
username: postgres
database: ur-db-dev
password: pass
encoding: UTF8
adapter: postgresql
timeout: 500
pool: 5
add postgres gem in your Gemfile
gem 'pg'
then,
bundle install
to install postgres gemrake db:create
to create your databaserake db:migrate
to migrate your migration filesUpvotes: 2