A Rails application for managing the Database A-Z list.
- Install Docker Desktop if you are using a Mac or PC.
- Run the following commands to install the dependencies and create the initial database.
To run the server with the Makefile, run the following command:
make up
To run the specs, run the following command:
make test
docker-compose up --build
docker-compose run --rm hummingbird bundle
docker-compose run --rm hummingbird bundle exec rails db:create
docker-compose run --rm hummingbird bundle exec rails db:migrate
docker-compose up
docker-compose run --rm hummingbird bundle exec spec
If you are testing on a local instance and create records in the database, you will want to delete them before testing a newer version that changes the DB schema. Your old records may be in violation of rules in the new version of the DB.
Delete existing local DB
docker-compose run hummingbird rake db:drop
Setting up database again
docker-compose run --rm hummingbird bundle exec rails db:migrate
Then run the "make" command as above.
To seed the database with the data located in test_data
, run the following command:
docker-compose run --rm hummingbird bundle exec rails db:seed
This command will destory existing database entries and seed the database with the data in test_data
.