Add troubleshooting for compilation error (#782)

* Add troubleshooting item

* Minor changes
This commit is contained in:
umonaca 2020-06-30 07:17:04 -04:00 committed by GitHub
parent 0f8951c40d
commit 5680e44983
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -26,3 +26,6 @@ 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 thats where the error comes from.
## **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.