I forked an existing rails project, added devise
to my Gemfile, and then installed it:
$ rails generate devise:install
$ rails generate devise User
$ rails db:migrate
After the initial migration, I tried to go to http://localhost:3000/users/sign_up but it generates a 500 error with the following information:
ActionView::Template::Error (Webpacker can't find application.js in /home/lucky/project/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:
{
}
As you can see, my manifest appears to be empty above. Thats because the directory /home/lucky/project/public/packs
doesn't exist. The rails project I'm working with was working fine before adding devise (I'm following a tutorial).
I'm unfamiliar with webpack. I've tried a couple of hints to no avail. I'd like to know why this directory is needed before I start mucking up my project structure. How do I fix this?
EDIT
(1) There is a packs directory under app/javascript
(2) config/webpacker.yml
seems to be aware of this location:
[snip]
default: &default
source_path: app/javascript
source_entry_path: packs
public_root_path: public
public_output_path: packs
cache_path: tmp/cache/webpacker
webpack_compile_output: true
[/snip]
(3) There is no manifest.json
anywhere in the app directory structure.