После попытки запустить веб-сервер rails без указания среды, компиляция Webpacker завершается с ошибкой:
[Webpacker] Compiling...
[Webpacker] Compilation failed:
/home/rails6/node_modules/webpack-cli/bin/cli.js:93
throw err;
^
ReferenceError: environment is not defined
at Object.<anonymous> (/home/rails6/config/webpack/environment.js:5:1)
at Module._compile (/home/rails6/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1011:10)
at Module.load (internal/modules/cjs/loader.js:822:32)
at Function.Module._load (internal/modules/cjs/loader.js:730:14)
at Module.require (internal/modules/cjs/loader.js:864:19)
at require (/home/rails6/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at Object.<anonymous> (/home/rails6/config/webpack/development.js:3:21)
at Module._compile (/home/rails6/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1011:10)
at Module.load (internal/modules/cjs/loader.js:822:32)
at Function.Module._load (internal/modules/cjs/loader.js:730:14)
at Module.require (internal/modules/cjs/loader.js:864:19)
at require (/home/rails6/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at WEBPACK_OPTIONS (/home/rails6/node_modules/webpack-cli/bin/utils/convert-argv.js:114:13)
at requireConfig (/home/rails6/node_modules/webpack-cli/bin/utils/convert-argv.js:116:6)
at /home/rails6/node_modules/webpack-cli/bin/utils/convert-argv.js:123:17
at Array.forEach (<anonymous>)
at module.exports (/home/rails6/node_modules/webpack-cli/bin/utils/convert-argv.js:121:15)
at /home/rails6/node_modules/webpack-cli/bin/cli.js:71:45
at Object.parse (/home/rails6/node_modules/yargs/yargs.js:567:18)
at /home/rails6/node_modules/webpack-cli/bin/cli.js:49:8
at Object.<anonymous> (/home/rails6/node_modules/webpack-cli/bin/cli.js:366:3)
at Module._compile (internal/modules/cjs/loader.js:971:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1011:10)
at Module.load (internal/modules/cjs/loader.js:822:32)
at Function.Module._load (internal/modules/cjs/loader.js:730:14)
at Module.require (internal/modules/cjs/loader.js:864:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/rails6/node_modules/webpack/bin/webpack.js:156:2)
Completed 500 Internal Server Error in 1681ms (ActiveRecord: 8.3ms | Allocations: 175316)
Есть какие-нибудь подсказки, как это исправить? Заранее спасибо.