1. How to solve Alias parsing was not enabled. To enable it pass aliases:true to to Psych::load or Psych::safe_load. (Psych::AliasesNotEnabled)
error?
Add gem 'psych', '< 4'
to your Gemfile and perform bundle install
.
2. Rails runs fine and webpacker runs fine but getting blank screen on localhost:3000.
Check if there is a version mismatch between shakapacker in ruby and JS. If so match their versions to 6.6.0
.
3. Rails runs fine and webpacker runs fine but getting blank screen on localhost:3000 despite having matching versions of shakapacker.
-
Have you started webpacker by running ./bin/webpacker-dev-server?
-
Since you're running Rails from a subsystem, you will have to run it in 0.0.0.0
to expose it through the network. Start the rails server with this command: RAILS_ENV=development bundle exec rails server -b 0.0.0.0
.
-
Are there any errors shown when running Webpacker or Rails? If so try debugging them.
4. Engine node is incompatible with this module. Expected version "18.12". Got "xx.xx.xx"
Execute the following in a new terminal:
-
nvm install 18.12
-
nvm use default 18.12
-
nvm alias default 18.12
-
Confirm version by executing node -v
. If it is still showing the previous version refresh the terminal (close and reopen). If still persists uninstall current version of node using nvm uninstall xx.xx.xx
5. FATAL: Role "name" does not exist
6. Errors related to :6379 port
Install/ Reinstall redis. Refer:
7. Dev server has been initialized using an options object that does not match the API schema. options has an unknown property '_assetEmittingPreviousFiles' ....
Downgrade @webpack-cli/serve
8. Issues with line endings in Windows
Many people might face the issues of type unterminated string meets end of file
. This is because of the issues with how Unix and Windows handles line endings. Windows uses CRLF for line endings. Unix uses LF for line endings. For the same reason when git is installed in Windows, it tends to auto format all line endings. This means if we have already configured line endings to be CRLF(\r\n
) windows will change replace all the \n
s with \r\n
effectively rendering it to be \r\r\n
which throws errors. To handle this, install WSL in windows and:
-
Install dos2unix: sudo apt install dos2unix
-
Execute command: find -type f -print0 | xargs -0 dos2unix
This reverses the above process and turns back all the line endings to proper CRLF. This is a time consuming process. Please be patient. After this turn off auto formatting line endings in git to prevent future errors: