From 2f9438d646da40cf39867571c302a234111abd5b Mon Sep 17 00:00:00 2001 From: Gabriel Lidenor <765963+GabrielLidenor@users.noreply.github.com> Date: Wed, 1 Jan 2025 19:05:55 -0500 Subject: [PATCH] chore: add package_json gem package_json gem is required to run the command rails g react_on_rails:install --- docs/migrating-from-react-rails-to-react_on_rails.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/migrating-from-react-rails-to-react_on_rails.md b/docs/migrating-from-react-rails-to-react_on_rails.md index a77bfe8f..8a639fd3 100644 --- a/docs/migrating-from-react-rails-to-react_on_rails.md +++ b/docs/migrating-from-react-rails-to-react_on_rails.md @@ -35,8 +35,9 @@ In this guide, it is assumed that you have upgraded the `react-rails` project to 1. Update Deps 1. Replace `react-rails` in `Gemfile` with the latest version of `react_on_rails` and run `bundle install`. - 2. Remove `react_ujs` from `package.json` and run `yarn install`. - 3. Commit changes! + 2. Add `package_json` in `Gemfile` ( if you don't have it already ) and run `bundle install` + 3. Remove `react_ujs` from `package.json` and run `yarn install`. + 4. Commit changes! 2. Run `rails g react_on_rails:install` but do not commit the change. `react_on_rails` installs node dependencies and also creates sample react component, Rails view/controller, and update `config/routes.rb`.