Skip to content

fix: scope dev server metadata to Ruby mode (#632) - #633

Merged
ElMassimo merged 1 commit into
mainfrom
fix/mode-scoped-dev-server-metadata-632
Sep 29, 2026
Merged

ElMassimo merged 1 commit into
mainfrom
fix/mode-scoped-dev-server-metadata-632

Conversation

@ElMassimo

@ElMassimo ElMassimo commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Description 📖

Fixes #632. A running development server no longer causes local test requests to proxy to an empty test port.

Background 📜

Ruby previously treated the existence of the shared tmp/vite-ruby.json as evidence that the current mode’s dev server was running. The Vite plugin wrote that file regardless of mode.

The Fix 🔨

  • Write/read tmp/vite-ruby-<mode>.json using the resolved Ruby mode; check the recorded port against the Ruby config before proxying.
  • Cover cross-mode detection (including modes with the same port), mismatched ports, malformed metadata, cleanup, and the version requirement.
  • Update troubleshooting/config docs and require vite-plugin-ruby@^5.2.5 from vite_ruby.

Keep development and test servers from sharing a metadata file, and verify the recorded port before proxying. Require the corresponding vite-plugin-ruby patch so the Ruby reader and Vite writer use the same path.
@ElMassimo
ElMassimo marked this pull request as ready for review September 29, 2026 17:36
@ElMassimo
ElMassimo merged commit d3d8e6f into main Sep 29, 2026
6 of 10 checks passed
@ElMassimo
ElMassimo deleted the fix/mode-scoped-dev-server-metadata-632 branch September 29, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test env proxies assets to an empty port while the development dev server is running (shared tmp/vite-ruby.json)

1 participant