ruby 2.6.5p114 (2019-10-01 revision 67812) [x64-mingw32]
Rails 6.0.4.1
docker
#
rails new react-app --webpack=react --database=postgresql
#
rails g controller pages index
我在路由页面 设置
Rails.application.routes.draw do
# 根目录
root 'pages#index'
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
end
报错显示
Webpacker can't find hello_react in C:/Users/18026/Desktop/react_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.
解决方案:
https://stackoverflow.com/questions/58270161/webpacker-cant-find-application
搜索无果