Solving Rails 6 Webpacker Install Error in Arch GNU/Linux
Hi! This Tip Try to Solve Rails 6 Webpacker Installation Error in Arch GNU/Linux Desktops.
This Issue is due from the Conflict between Webpacker and Psyck Ruby Gems.
Webpacker, use Webpack to manage app-like JavaScript modules in Rails.
Psych is a YAML Parser and Emitter. Psych leverages libyaml[https://pyyaml.org/wiki/LibYAML] for its YAML parsing and emitting capabilities. In addition to wrapping libyaml, Psych also knows how to serialize and de-serialize most Ruby objects to and from the YAML format.
Finally, this Setup is valid for all the Arch Linux Based Distros like:
- Manjaro
- CachyOS
- EndeavourOS
- Garuda
- ArcoLinux
- Archman
- Bluestar
- Archcraft
- ArchLabs
- ArchBang
- BlackArch
- Artix
1. Installing NodeJs
How to Install NodeJs in GNU/Linux
Follow instructions to Setup Node.js 16 LTS!2. Fixing App
Then to Solve Rails 6 Webpacker Install Error in Arch Linux
Access Rails App Target:cd [/path/2/railsApp]
Edit the Gemfile
In case, with the nano Editor like:nano ./Gemfile
Then to manage the psych Version Append:gem 'psych', '< 4'
And again Upgrade the webpacker Gem minimum Release:gem 'webpacker', '~>5.0'
Next Update your Gems Bundle with:bundle update
Now to Setup Webpacker run:rails webpacker:install
Just confirm to Overwrite all proposed Files.
Last, Install the missing Babel Plugins:yarn add @babel/plugin-proposal-private-methods
yarn add @babel/plugin-proposal-private-property-in-object