From bc0afc305bae5fa2b3d8c06b2cae0a4b8884cd2e Mon Sep 17 00:00:00 2001 From: crespire Date: Mon, 4 May 2026 21:31:56 -0400 Subject: [PATCH] Fix bindev and readme --- README.md | 15 ++++++++------- bin/dev | 10 ++++++++-- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 6858915..0f61841 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,15 @@ Website, Rails powered! ### Requirements -* Ruby 3.3.5 -* node >= 20 +* Ruby 4.0.3 +* node >= 24 * PSQL >= 14 +* Rails 8.0 ### Development Setup -Changes should be added via merge request, as `main` has a CI action that deploys on merge. The application relies on a PostgreSQL instance for its database, so make sure to set that up for your local environment. +Changes should be added via pull request, as `main` has a CI action that deploys on merge. The application relies on a PostgreSQL instance for its database, so make sure to set that up for your local environment. -Because we use ActionText, the application does require dependencies for ActiveStorage as well (ie, `libvips`) though these are currently not used. +ActionText is wired up (and pulls in ActiveStorage), so `libvips` is required even though no page currently uses uploads. The database and storage configurations are provided in a `.sample` file, make sure you copy those and rename them to the correct `.yml` file. These files are git ignored, so you can set up your local environment as needed. @@ -24,9 +25,9 @@ The database and storage configurations are provided in a `.sample` file, make s This should get the application setup and ready to run. -To run the application locally: -1. Run `bin/dev` - this command will watch JS and CSS to rebuild -1. Run `bundle exec rails s` - this command will run the Rails server +To run the application locally, in two separate consoles: +1. Run `bin/dev` - watches and rebuilds JS and CSS (runs `Procfile.dev` via foreman) +1. Run `bin/rails s` - starts the Rails server ### Deploying to Production This application is deployed via Dockerfile, so changes that will affect dependencies, etc should be reflected in the `Dockerfile`. diff --git a/bin/dev b/bin/dev index 5f91c20..74ade16 100755 --- a/bin/dev +++ b/bin/dev @@ -1,2 +1,8 @@ -#!/usr/bin/env ruby -exec "./bin/rails", "server", *ARGV +#!/usr/bin/env sh + +if ! gem list foreman -i --silent; then + echo "Installing foreman..." + gem install foreman +fi + +exec foreman start -f Procfile.dev "$@"