-
-
Notifications
You must be signed in to change notification settings - Fork 638
Add react_on_rails:doctor generator for setup diagnostics #1787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
e857e7a
Add react_on_rails:doctor generator for setup diagnostics
justin808 fb24efd
Fix RuboCop linting issues and improve code quality
justin808 8c2a0ed
Fix test failures and ensure CI compatibility
justin808 c6aef7b
Fix Prettier formatting for CHANGELOG and CLAUDE.md
justin808 33b7a4c
Refactor doctor from Rails generator to rake task and remove irrelevaβ¦
justin808 5f81305
Add version reporting to doctor for React, Shakapacker, and Webpack
justin808 c9e5146
Fix server bundle path detection to use Shakapacker configuration
justin808 9d53402
Use Shakapacker gem API for server bundle path detection
justin808 17db728
Improve doctor output with contextual and actionable recommendations
justin808 40d161e
Add temporary debug info to diagnose path duplication issue
justin808 df0ad01
Fix server bundle path duplication by handling nested absolute paths
justin808 cfd9ccf
WIP: Doctor enhancements for Procfile and bin/dev analysis
justin808 13aa713
Fix linting issues in doctor functionality
justin808 9335b23
Complete linting fixes for doctor functionality
justin808 131ddd9
Enhance React on Rails doctor with comprehensive diagnostics
justin808 87ff317
Replace shell-dependent backtick call with secure Open3 invocation
justin808 0b72fc2
Apply autofix formatting and resolve linting violations
justin808 bf68310
Implement comprehensive doctor improvements based on user feedback
justin808 b591a8e
Fix webpack inspection commands to use valid options
justin808 bb648dd
Improve bundle analysis instructions with complete workflow
justin808 56902b0
Enhance React on Rails doctor with comprehensive configuration analysis
justin808 1a0a0f2
Fix shell injection vulnerabilities and RuboCop violations
justin808 1926e65
Trigger CI to test security and linting fixes
justin808 85db2ab
Fix Prettier formatting in CLAUDE.md
justin808 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| Description: | ||
| The `react_on_rails:doctor` generator diagnoses your React on Rails setup | ||
| and identifies potential configuration issues. It performs comprehensive | ||
| checks on your environment, dependencies, and configuration files. | ||
|
Comment on lines
+2
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update docs: this is a Rake task, not a generator Replace βgeneratorβ wording and all examples with the rake task usage. Apply this diff: - The `react_on_rails:doctor` generator diagnoses your React on Rails setup
+ The `react_on_rails:doctor` Rake task diagnoses your React on Rails setup
@@
- # Basic diagnosis
- rails generate react_on_rails:doctor
+ # Basic diagnosis
+ rake react_on_rails:doctor
@@
- # Verbose output showing all checks
- rails generate react_on_rails:doctor --verbose
+ # Verbose output showing all checks
+ VERBOSE=true rake react_on_rails:doctor
@@
- # Show help
- rails generate react_on_rails:doctor --help
+ # Show help
+ rake -T react_on_rails
+ # Or detailed task description (if provided)
+ rake -D react_on_rails:doctorAlso applies to: 12-21 π€ Prompt for AI Agents |
||
|
|
||
| This command is especially useful for: | ||
| β’ Troubleshooting setup issues | ||
| β’ Verifying installation after running react_on_rails:install | ||
| β’ Ensuring compatibility after upgrades | ||
| β’ Getting help with configuration problems | ||
|
|
||
| Example: | ||
| # Basic diagnosis | ||
| rails generate react_on_rails:doctor | ||
|
|
||
| # Verbose output showing all checks | ||
| rails generate react_on_rails:doctor --verbose | ||
|
|
||
| # Show help | ||
| rails generate react_on_rails:doctor --help | ||
|
|
||
| Checks performed: | ||
| Environment Prerequisites: | ||
| β’ Node.js installation and version compatibility | ||
| β’ JavaScript package manager availability (npm, yarn, pnpm, bun) | ||
| β’ Git working directory status | ||
|
|
||
| React on Rails Packages: | ||
| β’ React on Rails gem installation | ||
| β’ react-on-rails NPM package installation | ||
| β’ Version synchronization between gem and NPM package | ||
| β’ Shakapacker configuration and installation | ||
|
|
||
| Dependencies: | ||
| β’ React and React DOM installation | ||
| β’ Babel preset configuration | ||
| β’ Required development dependencies | ||
|
|
||
| Rails Integration: | ||
| β’ React on Rails initializer configuration | ||
| β’ Route and controller setup (Hello World example) | ||
| β’ View helper integration | ||
|
|
||
| Webpack Configuration: | ||
| β’ Webpack config file existence and structure | ||
| β’ React on Rails compatibility checks | ||
| β’ Environment-specific configuration validation | ||
|
|
||
| Development Environment: | ||
| β’ JavaScript bundle files | ||
| β’ Procfile.dev for development workflow | ||
| β’ .gitignore configuration for generated files | ||
|
|
||
| Options: | ||
| --verbose, -v: Show detailed output for all checks, including successful ones | ||
| --fix, -f: Attempt to fix simple issues automatically (planned feature) | ||
|
|
||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Exit codes: | ||
| 0: All checks passed or only warnings found | ||
| 1: Critical errors found that prevent React on Rails from working | ||
|
|
||
| For more help: | ||
| β’ Documentation: https://github.com/shakacode/react_on_rails | ||
| β’ Issues: https://github.com/shakacode/react_on_rails/issues | ||
| β’ Discord: https://discord.gg/reactrails | ||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doctor should be
rake react_on_rails:doctor
and NOT a generator