Webpacker::Manifest::MissingEntryError in Entries#index

PC_Troubleshooting

Ruby on Railsにおいてhttp://localhost:3000/entriesに接続できない

Showing C:/Users/Documents/Rails/app/views/layouts/application.html.erb where line #10 raised:

Webpacker can't find application.js in C:/Users/Documents/Rails/app/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:
{
}

Extracted source (around line #10):

app/views/layouts/application.html.erb の下記赤い部分を削除すると現象改善する。このやり方が正しいのかは不明。コメントアウトでは現象改善せず。

<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>

</head>
<body>

Rails.root: C:/Users/Documents/Rails

タイトルとURLをコピーしました