添加 ERB 加载程序并将.erb
文件扩展名添加到我的application
包(使用webpacker)后,我收到以下错误:
ERROR in ./app/webpack/packs/application.js.erb
Module build failed: Error: spawn bin/rails ENOENT
at _errnoException (util.js:1024:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
@ multi (webpack)-dev-server/client?http://localhost:3035 ./app/webpack/packs/application.js.erb
样品hello_erb.js.erb
包也会发生这种情况。
这是一个重现问题的示例应用程序:https ://github.com/jonhue/test_app