-
-
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
Changes from 23 commits
e857e7a
fb24efd
8c2a0ed
c6aef7b
33b7a4c
5f81305
c9e5146
9d53402
17db728
40d161e
df0ad01
cfd9ccf
13aa713
9335b23
131ddd9
87ff317
0b72fc2
bf68310
b591a8e
bb648dd
56902b0
1a0a0f2
1926e65
85db2ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Member
Author
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. doctor should be rake react_on_rails:doctor and NOT a generator |
| 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
Contributor
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 | ||
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.
Fix trailing newline formatting inconsistency.
The file has an inconsistent trailing newline that will cause the pipeline to fail based on the critical requirements you've documented.
π€ Prompt for AI Agents