@@ -248,7 +248,7 @@ gem 'react_on_rails', path: '../relative/path/to/react_on_rails'
248248
249249Then run ` bundle ` .
250250
251- The main installer can be run with ` rails generate react_on_rails:install `
251+ The main installer can be run with ` ./bin/ rails generate react_on_rails:install`
252252
253253Then use yalc to add the npm module.
254254
@@ -277,11 +277,19 @@ For comprehensive testing of generator changes, use this manual testing workflow
277277** 1. Set up test application with clean baseline:**
278278
279279``` bash
280- # Navigate to test app directory (replace with your test app)
281- cd ~ /shakacode/react-on-rails/react_on_rails-test-apps/react-on-rails-tutorial-v15
280+ # Create a test Rails app
281+ mkdir -p {project_dir}/test-app
282+ cd {project_dir}/test-app
283+ rails new . --skip-javascript
284+
285+ # Set up for testing the generator
286+ echo ' gem "react_on_rails", path: "../react_on_rails"' >> Gemfile
287+ yalc add react-on-rails
282288
283289# Create a clean baseline tag for testing
290+ git init && git add . && git commit -m " Initial commit"
284291git tag generator_testing_base
292+ bundle install
285293
286294# Clean reset to baseline state
287295git clean -fd && git reset --hard && git clean -fd
@@ -302,7 +310,7 @@ git clean -fd && git reset --hard generator_testing_base && git clean -fd
302310bundle install
303311
304312# Run generator - should install Shakapacker automatically
305- rails generate react_on_rails:install
313+ ./bin/ rails generate react_on_rails:install
306314
307315# Verify Shakapacker was added to Gemfile and installed correctly
308316```
@@ -313,18 +321,17 @@ rails generate react_on_rails:install
313321# Reset to clean baseline
314322git clean -fd && git reset --hard generator_testing_base && git clean -fd
315323
316- # Ensure Shakapacker is in Gemfile
317- echo ' gem "shakapacker", "~> 8.0"' >> Gemfile
318- bundle install
324+ # Add Shakapacker to Gemfile
325+ bundle add shakapacker --strict
319326
320327# Run Shakapacker installer first
321- bundle exec rails shakapacker:install
328+ ./bin/ rails shakapacker:install
322329
323330# Edit Gemfile to update gem path: gem 'react_on_rails', path: '../path/to/main/repo'
324331bundle install
325332
326333# Run generator - should detect existing Shakapacker
327- rails generate react_on_rails:install
334+ ./bin/ rails generate react_on_rails:install
328335
329336# Verify generator adapts to existing Shakapacker setup
330337```
@@ -342,44 +349,6 @@ For each commit tested, document:
342349
343350This systematic approach ensures generator changes work correctly whether Shakapacker is pre-installed or needs to be installed by the generator.
344351
345- #### Testing Specific Generator Commits
346-
347- When testing specific commits that fix generator issues, follow this process:
348-
349- ** Example: Testing commits 81c66fa and bc69dcd0**
350-
351- 1 . ** Commit 81c66fa** : "Now automatically creates packs" - Test pack generation functionality
352- 2 . ** Commit bc69dcd0** : "Fix React on Rails v15 generator and restore colorized output" - Test generator fixes and output formatting
353-
354- ** Testing workflow for each commit:**
355-
356- ``` bash
357- # In main react_on_rails repository
358- cd ~ /shakacode/react-on-rails/react_on_rails
359- git checkout < commit-hash> # e.g., 81c66fa or bc69dcd0
360-
361- # In test application
362- cd ~ /shakacode/react-on-rails/react_on_rails-test-apps/react-on-rails-tutorial-v15
363-
364- # Reset to clean baseline
365- git clean -fd && git reset --hard generator_testing_base && git clean -fd
366-
367- # Update Gemfile to point to current commit
368- # Edit: gem 'react_on_rails', path: '../../../react_on_rails'
369- bundle install
370-
371- # Test both Shakapacker scenarios (A and B above)
372- # Document results for this specific commit
373- ```
374-
375- ** Expected outcomes to verify:**
376-
377- - Generator completes without errors
378- - Shakapacker integration works correctly
379- - React components render and are interactive
380- - Development server starts successfully with ` bin/dev `
381- - Console output shows expected messages and minimal warnings
382-
383352#### Testing Generator with Yalc for React Component Functionality
384353
385354When testing the install generator with new Rails apps, you need to use ** yalc** for the JavaScript package to ensure React components work correctly. The Ruby gem path reference is insufficient for client-side rendering.
@@ -523,14 +492,8 @@ rake lint
523492### 1. ** After Making Code Changes**
524493
525494``` bash
526- # MANDATORY: Run linters after code changes
527- rake lint
528-
529- # If any violations, auto-fix immediately
530- rake autofix # One command to run all auto-fixes
531-
532- # Verify everything passes
533- rake lint
495+ # Auto-fix all linting violations after code changes
496+ rake autofix
534497```
535498
536499### 2. ** Common AI Agent Mistakes**
0 commit comments