- Install Ruby
3.2.1
. - Create
.env
file in root folder of the project. - Install PostgreSQL
>=14.13
. - Add corresponded env vars to
.env
file with DB credentials. E.g.:
HEALTHKEEPER_DEVELOPMENT_DATABASE = "healthkeeper_development"
HEALTHKEEPER_DEVELOPMENT_DATABASE_USERNAME = "healthkeeper"
HEALTHKEEPER_DEVELOPMENT_DATABASE_PASSWORD = "magic"
HEALTHKEEPER_TEST_DATABASE = "healthkeeper_test"
HEALTHKEEPER_TEST_DATABASE_USERNAME = "healthkeeper"
HEALTHKEEPER_TEST_DATABASE_PASSWORD = "magic"
- Run
./bin/bundle install
- Run
rails db:setup
. - In order to recreate DB run
rails db:reset
. - In order to (re)populate DB with a testing data run
rails db:seed
. - To run Rails server use
./bin/dev
instead ofrails s
/rails server
(see next chapter if curious why).
In order to support hot reload of TailwindCSS class changes, you need to run Rails server with
./bin/dev
instead ofrails s
/rails server
.