Ruby on rails Webpacker can';在RubyonRails 6中的D:/ROR/blog/public/packs/manifest.json中找不到application.js
我是Rails 6的新手。 我遵循了他们的文档(),但我有一些与webpacker相关的错误。 我在routes文件(config/routes.rb)上创建了一条路由 我创建了ArticlesController及其索引操作Ruby on rails Webpacker can';在RubyonRails 6中的D:/ROR/blog/public/packs/manifest.json中找不到application.js,ruby-on-rails,ruby,rubygems,ruby-on-rails-6,webpacker,Ruby On Rails,Ruby,Rubygems,Ruby On Rails 6,Webpacker,我是Rails 6的新手。 我遵循了他们的文档(),但我有一些与webpacker相关的错误。 我在routes文件(config/routes.rb)上创建了一条路由 我创建了ArticlesController及其索引操作 bin/rails generate controller Articles index --skip-routes 我运行服务器 bin/rails server 当我访问http://localhost:3000/articles,这个错误发生了 Webpacke
bin/rails generate controller Articles index --skip-routes
我运行服务器
bin/rails server
当我访问http://localhost:3000/articles,这个错误发生了
Webpacker::Manifest::MissingEntryError in Articles#index
Showing D:/ROR/blog/app/views/layouts/application.html.erb where line #10 raised:
Webpacker can't find application.js in D:/ROR/blog/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:
{
}
我建议您切换到Linux,从3.x版开始学习Rails谢谢您的评论。但是我想使用rails 6.1。rails 6.1上有什么解决方案吗?没有,我没有遇到过这种问题。似乎是由webpack引起的,在开发环境中是无用的。Rails 6包含了太多的知识,Rails 3.x对新手非常友好:(谢谢你的帮助。我在mac上遇到了完全相同的问题。我建议你切换到Linux,开始学习3.x版的Rails谢谢你的评论。但是我想使用Rails 6.1。Rails 6.1上有什么解决方案吗?没有,我没有遇到这种问题。似乎是由webpack引起的,它在开发环境中是无用的。Rails 6包含了太多的知识,Rails 3.x对新蜜蜂非常友好。:(谢谢你的帮助。我在mac上遇到了完全相同的问题。
Webpacker::Manifest::MissingEntryError in Articles#index
Showing D:/ROR/blog/app/views/layouts/application.html.erb where line #10 raised:
Webpacker can't find application.js in D:/ROR/blog/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:
{
}