This is a simple application that uses Rails 7, Hotwire, and the OpenTDB to build a multiplayer trivia game for up to four players. It's still in active development so it doesn't do that quite yet. Maybe it will grow up someday. It's also not particularly monster themed yet, but I was initially thinking to have the players have some monster tropes and maybe some monster mechanics. That's even further down the road, though.
- Ruby 3.1.0
- Bundler
- Foreman (installed outside of the project, globally please)
- Postgres
- Redis
- Make sure you have docker installed on your system
- Clone from github
- Copy
dotenv
to.env
- Run
bin/setup
- Once everything has been installed, use
bin/dev
to run the tailwind build process, the sidekiq job queue, and the rails server in three different processes.- Alternatively, you can run these commands directly with
bin/rails s
,bin/rails tailwindcss:watch
, andbin/sidekiq
in three separate terminal instances
- Alternatively, you can run these commands directly with
- In development, run
bin/guard
to detect changes to files and run relevant specs. This will help assure that nothing is breaking.
- Copy
dotenv
to.env
- Run
docker compose build web
to build the trivia_app image ahead of time (many utilities and tools depend on it) - Run
docker compose run web bin/setup
to set up the application - Run
docker compose up
to start the suite- Optionally run
docker compose run web bin/guard
to start the rspec watcher.
- Optionally run
Use docker compose run rails spec
to run specs
To install new dependencies, rebuild the web image with docker compose build web
docker compose run
, you will accumulate stopped containers over time. Consider using the --rm
flag to automatically clean up after yourself. For example, docker compose run --rm guard
.