Add troubleshooting step about NODE_OPTIONS=--openssl-legacy-provider
This commit is contained in:
parent
40dab49db2
commit
1017e91968
|
@ -27,6 +27,10 @@ Check that you have run `RAILS_ENV=production bin/rails db:migrate` after the up
|
|||
|
||||
Check that you are specifying the correct environment with `RAILS_ENV=production` before the command. By default, the environment is assumed to be development, so the code tries to load development-related gems. However, in production environments, we avoid installing those gems, and that’s where the error comes from.
|
||||
|
||||
## **I encountered a compilation error while executing `RAILS_ENV=production bundle exec rails assets:precompile`, with multiple error messages along the lines of `Error: error:0308010C:digital envelope routines::unsupported`. How to fix it?**
|
||||
|
||||
Run `RAILS_ENV=production bundle exec rake tmp:cache:clear` to clear cache, then execute `NODE_OPTIONS=--openssl-legacy-provider RAILS_ENV=production bundle exec rails assets:precompile`.
|
||||
|
||||
## **I encountered a compilation error while executing `RAILS_ENV=production bundle exec rails assets:precompile`, but no more information is given. How to fix it?**
|
||||
|
||||
Usually it's because your server ran out of memory while compiling assets. Use a swapfile or increase the swap space to increase the memory capacity. Run `RAILS_ENV=production bundle exec rake tmp:cache:clear` to clear cache, then execute `RAILS_ENV=production bundle exec rails assets:precompile` to compile again. Make sure you clear the cache after a compilation error, or it will show "Everything's OK" but leave the assets unchanged.
|
||||
|
|
Loading…
Reference in New Issue