I am deploying a rails 6.x application to AWS elastic beanstalk, but cannot get the assets to compile.
I continue to see the error of:
ActionView::Template::Error (Webpacker can't find application in /var/app/current/public/packs/manifest.json. Possible causes:
1. You want to set webpacker.yml value of compile to true for your environment
unless you are using the `webpack -w` or the webpack-dev-server.
2. webpack has not yet re-run to reflect updates.
3. You have misconfigured Webpacker's config/webpacker.yml file.
4. Your webpack configuration is not creating a manifest.
Your manifest contains:
{
}
):
In my container_commands for a rails setup config inside of my .ebextensions directory, I have the following:
container_commands:
07_yarn_install:
command: "yarn install --check-files --force --production"
08_install_weback:
command: "sudo npm install --save-dev webpack"
09_install_babel:
command: "sudo npm install --save-dev babel-loader"
10_webpack:
command: "bundle exec rails webpacker:install"
11_asset_precompile:
command: "RAILS_ENV=production bundle exec rake assets:precompile"