Run the doctor fix loop
Read the version-matched package guide, then run:
bin/rails react_on_rails:doctor FORMAT=json
- Parse standard output as one JSON document; treat incidental standard-error output as diagnostics.
- Process non-passing checks in array order using their stable
id,severity,message,remediation.prompt,remediation.files, andremediation.expected_end_statefields. - Inspect the named files and verify the diagnosis before editing. Do not invent a broad automatic
fix from a check ID, and do not treat a nullable
fix_commandas required. - Make the smallest correction, review its diff, and rerun the doctor.
- Continue until the report has no error-level checks. Warnings are advisory but should be reported.
- Run the focused build or test that exercises each repaired subsystem.
The hosted JSON contract is a secondary reference: https://reactonrails.com/docs/api-reference/doctor.