diff --git a/Gemfile b/Gemfile index b323952..e6c7c3b 100644 --- a/Gemfile +++ b/Gemfile @@ -7,8 +7,8 @@ ruby '~> 2.7.0' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main' gem 'rails', '~> 6.1.6', '>= 6.1.6.1' -# Use sqlite3 as the database for Active Record -gem 'sqlite3', '~> 1.4' +# Use PostgreSQL as the database for Active Record +gem 'pg' # Use Puma as the app server gem 'puma', '~> 5.0' # Use SCSS for stylesheets diff --git a/config/database.yml b/config/database.yml index 4a8a1b2..8b158fc 100644 --- a/config/database.yml +++ b/config/database.yml @@ -10,15 +10,24 @@ default: &default timeout: 5000 development: - <<: *default - database: db/development.sqlite3 +adapter: postgresql +host: localhost +username: postgres +password: password +pool: 5 +database: todo_list_development # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. + test: - <<: *default - database: db/test.sqlite3 + adapter: postgresql + host: localhost + username: postgres + password: password + pool: 5 + database: todo_list_test production: <<: *default