Skip to content

Instantly share code, notes, and snippets.

@FrancescoK
Last active June 14, 2025 13:18
Show Gist options
  • Select an option

  • Save FrancescoK/74e1c6d0ed01011ebeffc11797d19198 to your computer and use it in GitHub Desktop.

Select an option

Save FrancescoK/74e1c6d0ed01011ebeffc11797d19198 to your computer and use it in GitHub Desktop.
OpenAI codex environment setup script for Rails 8 with Playwright
#!/usr/bin/env bash
set -euo pipefail
apt-get update -qq
apt-get install -yqq libreadline-dev zlib1g-dev libyaml-dev libvips-dev libheif-dev libde265-dev xz-utils ca-certificates wget libpq-dev vim unzip gnupg2 dirmngr
# Uncomment if you run Postgres. Make sure to add postgres to apt-get install on line 5
# pg_ctlcluster --skip-systemctl-redirect 16 main start
# su - postgres -c "createuser -s $(whoami)"
gem update --system --no-document
gem install bundler --no-document
npm install
# Using Playwright for system tests instead of Selenium
npx playwright install chromium
bundle
bin/rails db:prepare
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment