Open
Conversation
Add cross-env to handle setting env vars on the command line. Add tzinfo-data gem when on Windows.
There was a problem hiding this comment.
Pull request overview
This PR adds Windows development environment support to the Rails + React application by:
- Using
cross-envto handle cross-platform environment variables in npm scripts - Adding
tzinfo-datagem for Windows timezone support - Adding platform-specific gem dependencies for Windows (
x64-mingw-ucrt) - Extending
database.ymlto support environment-based database credentials for Windows - Refactoring the
startscript to use separateserverandclientcommands
Changes:
- Added
cross-env@^10.1.0dependency and updated npm scripts to use it for environment variables - Added
tzinfo-datagem with Windows platform guard toGemfile - Extended
database.ymlto supportDATABASE_USERNAME,DATABASE_PASSWORD, andDATABASE_HOSTenvironment variables - Added
.env.samplecomment aboutWEB_CONCURRENCY=0for Windows Puma configuration - Updated
Gemfile.lockandyarn.lockwith platform-specific dependencies
Reviewed changes
Copilot reviewed 3 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Added cross-env and @epic-web/invariant dependencies for Windows environment variable handling |
| package.json | Added cross-env and updated npm scripts; reorganized react-dropzone dependency; refactored start command |
| Gemfile | Added tzinfo-data gem with Windows-only platform guard |
| Gemfile.lock | Added Windows platform (x64-mingw-ucrt) versions of native gems (pg, nokogiri, grpc, etc.) and tzinfo-data |
| config/database.yml | Added DATABASE_USERNAME, DATABASE_PASSWORD, and DATABASE_HOST configuration from environment variables |
| .env.sample | Added commented documentation for WEB_CONCURRENCY=0 Windows setting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
04e8975 to
486588a
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
alulabeshue-sfgov
left a comment
There was a problem hiding this comment.
Locally on my mac this branch is failing, running yarn start and visiting localhost:3000 results in the below
[SERVER] Started GET "/" for ::1 at 2026-04-10 10:58:38 -0700
[SERVER] objc[80679]: +[NSCharacterSet initialize] may have been in progress in another thread when fork() was called.
[SERVER] objc[80679]: +[NSCharacterSet initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
[SERVER] [80535] - Worker 0 (PID: 80756) booted in 0.7s, phase: 0
[SERVER] Started GET "/" for ::1 at 2026-04-10 10:58:41 -0700
[SERVER] objc[80756]: +[NSCharacterSet initialize] may have been in progress in another thread when fork() was called.
[SERVER] objc[80756]: +[NSCharacterSet initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
[SERVER] [80535] - Worker 0 (PID: 80759) booted in 0.67s, phase: 0
[SERVER] Started GET "/" for ::1 at 2026-04-10 10:58:43 -0700
[SERVER] objc[80759]: +[NSCharacterSet initialize] may have been in progress in another thread when fork() was called.
[SERVER] objc[80759]: +[NSCharacterSet initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
[SERVER] [80535] - Worker 0 (PID: 80761) booted in 0.67s, phase: 0
[SERVER] Started GET "/" for ::1 at 2026-04-10 10:58:48 -0700
[SERVER] objc[80761]: +[NSCharacterSet initialize] may have been in progress in another thread when fork() was called.
[SERVER] objc[80761]: +[NSCharacterSet initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
[SERVER] [80535] - Worker 0 (PID: 80764) booted in 0.71s, phase: 0
[SERVER] Started GET "/" for ::1 at 2026-04-10 10:58:53 -0700
[SERVER] objc[80764]: +[NSCharacterSet initialize] may have been in progress in another thread when fork() was called.
[SERVER] objc[80764]: +[NSCharacterSet initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
[SERVER] [80535] - Worker 0 (PID: 80766) booted in 0.62s, phase: 0
[SERVER] Started GET "/" for ::1 at 2026-04-10 10:59:01 -0700
[SERVER] objc[80766]: +[NSCharacterSet initialize] may have been in progress in another thread when fork() was called.
[SERVER] objc[80766]: +[NSCharacterSet initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.```
Collaborator
|
what's the target tooling on windows? I would think wsl2 would "just work", but I don't have the experience |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Minimal changes to get the Rails + React dev environment running on Windows without breaking the existing Mac workflow.
The main thing to test is that nothing is broken or affected on macOS or CI/CD by these changes.
npm scripts — Added
cross-envto handle inline environment variables (TZ,NODE_OPTIONS,TIMING) that use Unix shell syntax. This is a no-op on Mac/Linux. Also fixed theyarn startscript which had nested quoting issues causingNODE_OPTIONSto be interpreted as a command on Windows — it now delegates toyarn serverandyarn client.Puma — Windows doesn't support
fork(), so Puma's clustered worker mode fails. AddedWEB_CONCURRENCY=0to.env.sample(commented, with explanation) to run Puma in single-process threaded mode on Windows.tzinfo-data — Windows has no system zoneinfo directory. Added the
tzinfo-datagem with a platform guard (platforms: %i[mingw mswin x64_mingw jruby]) so it's only pulled in on Windows.Bundler — Added
x64-mingw-ucrtplatform toGemfile.lockso native gems (pg,nokogiri, etc.) resolve for Windows Ruby.database.yml — Added
DATABASE_USERNAME,DATABASE_PASSWORD, andDATABASE_HOSTfrom env vars. On Mac with default trust/peer auth these are typically unset and Postgres connects without credentials as before. On Windows where Postgres usually requires a password, the values from.envare now picked up.Before requesting eng review
Version Control
angularif it contains updates to Angular codetype: TICKET-NUMBER Descriptionformat, useDAH-000if it does not need a ticketurgent: Descriptionformat if it is urgent and does not need a ticketCode quality
Code conventions
.scssstylesheets andui-seedstokens, rather than inline styles or TailwindReview instructions
Request eng review
needs reviewlabelHousing Enggroup to automatically assign reviewers, and/or assign specific engineersBefore merging
Request product acceptance (PA) testing
needs product acceptancelabel)