Skip to content

Upgrade docs to refer to Shakapacker #1211

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

Closed
justin808 opened this issue Oct 19, 2022 · 1 comment · Fixed by #1214
Closed

Upgrade docs to refer to Shakapacker #1211

justin808 opened this issue Oct 19, 2022 · 1 comment · Fixed by #1214

Comments

@justin808
Copy link
Collaborator

https://github.com/reactjs/react-rails#3-now-run-the-installers doc refers to webpacker.

Let's update this.

Assigned: @ahangarha

@justin808 justin808 added this to the 2.7 milestone Oct 19, 2022
@ahangarha
Copy link
Collaborator

I worked on this issue for a couple of days. I tried different scenarios and found two issues:

  1. I have realized there is an issue with config/webpacker.yml file generated by shakapacker. The value for source_entry_path is set to / which is taken as an absolute path by Ruby Pathname and as a result, react-rails install script tries to copy files to the root of filesystem. This can be fixed either by manually replacing / with ., or add some automation for overriding webpacker.yml file, or fix the issue right in the shakapacker project. I think this was a bug but never seen because no project uses / for that entry.
  2. For react-rails we need to install prop-types as well. We need to add this step in installing react and related packages before running rails g react:install.

With these two changes, I could install the project on both Rails 6 and Rails 7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants