wintermeyer
wintermeyer

Reputation: 8318

Webpacker::Manifest::MissingEntryError with a vanilla Rails 6 application

Software versions on a macOS 10.14.6 and 10.15:

$ ruby -v
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
$ rails -v
Rails 6.0.0
$ node -v
v6.14.4

Setup

$ rails new testshop3
$ cd testshop3
$ rails g scaffold Product name price:integer
$ rails db:migrate
$ rails s

This seems to be a very simple and straight forward setup but when I open http://localhost:3000/products I get the error message "Webpacker::Manifest::MissingEntryError in Products#index".

enter image description here

How can I fix this?

Upvotes: 2

Views: 4003

Answers (2)

Brian Piercy
Brian Piercy

Reputation: 649

I've got a nearly identical problem with node v11.5.0. My first idea was to run either of these:

>bundle exec rake assets:precompile
>rails assets:precompile

Both commands fail using yarn v1.10.1, because the yarn CLI can't find a "webpack" command.

Upvotes: 2

wintermeyer
wintermeyer

Reputation: 8318

I found a fix for the problem. But unfortunately I changed too many things at the same time so I have a hard time to pin down what the exact solution is. Here's what I did:

  • upgrade brew
  • uninstall and install RVM
  • install ruby 2.6.3
  • install rails 6.0.0
  • install nodejs 10.16.3 (after checking https://nodejs.org for the LTS)

After that it worked. Maybe the last step would have fixed the problem in the first place but I have no way of checking that.

Upvotes: 0

Related Questions