This happened after we rebuild the dev container, so I guess it’s equivalent to running rails test for the first time.
Error:
IslandersControllerTest#test_should_get_index:
ActionView::Template::Error: Webpacker can't find application in /workspaces/sixmilebridge/public/packs-test/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:
{
}
app/views/layouts/application.html.erb:9
test/controllers/islanders_controller_test.rb:9:in `block in <class:IslandersControllerTest>'
I just encountered this. I ended up having to call rails webpacker:compile before testing. It’s confusing because in webpacker.yml the default is compile: true.
test:
<<: *default
compile: true
# Compile test packs to a separate directory
public_output_path: packs-test
In the spirit of the May of WTFs – right now, Terrastories is revamping its Docker setup & general project setup to make better tradeoffs re: “offlinability” & first-time developer experience. I’m part of those efforts. If, while you’re checking that project out, you encounter WTFs that seem to be Terrastories-related rather than Rails-related, I’d really appreciate your feedback – either talk to me or file an issue there directly.
Thanks @avdi and @mmccall10, since a couple of days (I believe since introducing system tests) our CircleCI tests were throwing this same error and it got fixed by adding a rails webpacker:compile step in our .circleci/config.yml For me this was definitely a WTF.