A Rails application scaffold generated for the up_TrainRubyonRails project.
Prerequisites
- Ruby 3.3.0 (see
.ruby-version) - Rails 8.1.3
- PostgreSQL 12+ (server running locally or reachable remotely)
- Node (for JavaScript tooling) and a JS package manager (npm/yarn) if you use frontend tooling
Quick setup (development)
Run these commands from the project root:
# install Ruby (rbenv/asdf) and select the version in .ruby-version
bundle install
# copy example env and set values
cp .env.example .env
# optionally start local PostgreSQL with Homebrew
# brew services start postgresql
# create and migrate the database
rails db:create
rails db:migrate
rails db:seed
# start the app (use `bin/dev` if using foreman/overmind)
bin/devIf you prefer a single setup command and a local DB container, use:
docker compose up -d db
bin/setup --skip-serverNotes:
config/database.ymlis configured for PostgreSQL and will respectDATABASE_URLif provided.- If you prefer to set individual PG variables, use
PG_HOST,PG_PORT,PG_USERNAME,PG_PASSWORD, andPG_DATABASEin your environment.
Environment example
See .env.example for an example DATABASE_URL and other environment variables.
Running tests
rails testContinuous integration
This repository includes a starter GitHub Actions workflow at .github/workflows/ci.yml to run tests and linters.
Deployment
- Set
DATABASE_URLin your production environment (or configure your provider's database add-on). - Ensure
RAILS_ENV=productionand compile assets before starting the server.
If you want, I can also:
- update
config/database.ymlto read more env vars by default - add a
.ruby-version(already present) or.ruby-gemsetfor rvm users - create initial migrations and seeds for your domain models
File references:
config/database.yml— database configuration.ruby-version— Ruby version to use.env.example— example environment variables