Overview

CVWO Project

Name: Dai Tianle

Matriculation Number: A0196715U

Reference

This app is developed based on the tutorial For setting up ruby environment on latest mac os, I recommend this tutorial

Working app

Todonex

Install

Check your Ruby version

ruby -v

The ouput should start with something like ruby 2.7.2

If not, install the right ruby version using rbenv (it could take a while):

rbenv install 2.7.2

Install dependencies

Using Bundler and Yarn:

bundle && yarn

Test offline

rails server

Initialize the database

rails db:create db:migrate db:seed

Reset the database

rails db:migrate:reset 

Add heroku remotes

Using Heroku CLI:

heroku git:remote -a project
heroku git:remote --remote heroku-staging -a project-staging

Deploy

Directly to production

Push to Heroku production remote:

git push heroku

With Heroku pipeline (recommended)

Push to Heroku staging remote:

git push heroku-staging

Go to the Heroku Dashboard and promote the app to production or use Heroku CLI:

heroku pipelines:promote -a project-staging