boulder-food-rescue / food-rescue-robot

A Rails App for Managing "Just in Time" Food Rescue, Developed by/for Boulder Food Rescue in Boulder, CO, USA
49 stars 56 forks source link

Add rake commands to create and migrate test database. #162

Closed corneliusellen closed 6 years ago

corneliusellen commented 6 years ago

Overview

The setup for Linux / Mac specified in the ReadMe did not work on my Mac computer nor my classmate's Mac computer. There were two issues we ran into:

  1. The secret key was not generated automatically in the .env file.
  2. The test database was not created when running the the bin/setup file.

Details

I added a line to the ReadMe that states you must generate the rake secret key manually. I also added two lines to the bin/setup file which creates a test database and loads the schema. This monkey patch doesn't actually address why the bootstrap.db is not generating a test database.

Notes

Screenshots/Screencasts

When the .env file sets up the test environment database, it hits an error saying it has already been created: screen shot 2018-05-22 at 8 44 54 am However, when checking the my databases in psql, I only see a "bfr_webapp_db" and not the associated "bfr_webapp_db_test."