-
-
Notifications
You must be signed in to change notification settings - Fork 636
Open
Labels
Description
Problem
Currently, setting up the development environment requires running multiple commands in different directories:
# Root directory
pnpm install
bundle install
# Dummy app
cd spec/dummy
pnpm install
bundle install
# Pro package (if working on Pro features)
cd react_on_rails_pro
pnpm install
bundle install
cd react_on_rails_pro/spec/dummy
pnpm install
bundle installThis is error-prone and easy to forget, especially for new contributors or when switching between branches with different dependency requirements.
Proposed Solution
Add a top-level bin/setup script (the Rails convention) that:
- Installs all dependencies across all directories
- Runs any necessary setup tasks (e.g.,
rake node_package) - Provides clear output about what's being installed
- Handles errors gracefully with helpful messages
Example implementation
#!/bin/bash
set -e
echo "Setting up React on Rails development environment..."
# Root dependencies
echo "Installing root dependencies..."
pnpm install
bundle install
# Build node package
echo "Building node package..."
rake node_package
# Dummy app
echo "Setting up spec/dummy..."
cd spec/dummy
pnpm install
bundle install
cd ../..
# Pro package (if present)
if [ -d "react_on_rails_pro" ]; then
echo "Setting up react_on_rails_pro..."
cd react_on_rails_pro
pnpm install
bundle install
if [ -d "spec/dummy" ]; then
cd spec/dummy
pnpm install
bundle install
cd ../..
fi
cd ..
fi
echo ""
echo "Setup complete! You can now run:"
echo " rake # Run all tests"
echo " rake lint # Run linters"Acceptance Criteria
-
bin/setupscript exists and is executable - Running
bin/setupfrom the repo root installs all dependencies - Script handles missing directories gracefully (e.g., if Pro package isn't cloned)
- Script provides clear progress output
- Script fails fast with helpful error messages if something goes wrong
- README.md updated to reference
bin/setupin the development setup section
Related
This would also help with the CI setup steps, which currently duplicate this logic across multiple workflow files.
🤖 Generated with Claude Code
coderabbitai