rails: App generator fails with webpacker error

Steps to reproduce

Expected behavior

using: rails new project --edge --database=postgresql --skip=turbolinks --skipt-test

Actual behavior

rails  webpacker:install
RAILS_ENV=development environment is not defined in config/webpacker.yml, falling back to production environment
rails aborted!
Webpacker configuration file not found /Users/jorge/Projects/craiglist2/config/webpacker.yml. Please run rails webpacker:install Error: No such file or directory @ rb_sysopen - /Users/jorge/Projects/craiglist2/config/webpacker.yml
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/webpacker-2cef2fd6c208/lib/webpacker/configuration.rb:95:in `rescue in load'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/webpacker-2cef2fd6c208/lib/webpacker/configuration.rb:91:in `load'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/webpacker-2cef2fd6c208/lib/webpacker/configuration.rb:88:in `data'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/webpacker-2cef2fd6c208/lib/webpacker/configuration.rb:84:in `fetch'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/webpacker-2cef2fd6c208/lib/webpacker/configuration.rb:23:in `source_path'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/webpacker-2cef2fd6c208/lib/webpacker/railtie.rb:94:in `block in <class:Engine>'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/initializable.rb:32:in `instance_exec'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/initializable.rb:32:in `run'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/initializable.rb:61:in `block in run_initializers'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/initializable.rb:60:in `run_initializers'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/application.rb:363:in `initialize!'
/Users/jorge/Projects/craiglist2/config/environment.rb:5:in `<main>'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/zeitwerk-2.2.0/lib/zeitwerk/kernel.rb:23:in `require'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/activesupport/lib/active_support/dependencies.rb:325:in `block in require'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/activesupport/lib/active_support/dependencies.rb:291:in `load_dependency'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/activesupport/lib/active_support/dependencies.rb:325:in `require'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/application.rb:339:in `require_environment!'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/application.rb:515:in `block in run_tasks_blocks'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/command.rb:48:in `invoke'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/commands.rb:18:in `<main>'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/activesupport/lib/active_support/dependencies.rb:325:in `block in require'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/activesupport/lib/active_support/dependencies.rb:291:in `load_dependency'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/activesupport/lib/active_support/dependencies.rb:325:in `require'
/Users/jorge/Projects/craiglist2/bin/rails:9:in `<top (required)>'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `load'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `call'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/client/command.rb:7:in `call'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/client.rb:30:in `run'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/bin/spring:49:in `<top (required)>'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `load'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `<top (required)>'
/Users/jorge/Projects/craiglist2/bin/spring:15:in `require'
/Users/jorge/Projects/craiglist2/bin/spring:15:in `<top (required)>'
./bin/rails:3:in `load'
./bin/rails:3:in `<main>'

Caused by:
Errno::ENOENT: No such file or directory @ rb_sysopen - /Users/jorge/Projects/craiglist2/config/webpacker.yml
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/webpacker-2cef2fd6c208/lib/webpacker/configuration.rb:92:in `read'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/webpacker-2cef2fd6c208/lib/webpacker/configuration.rb:92:in `read'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/webpacker-2cef2fd6c208/lib/webpacker/configuration.rb:92:in `load'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/webpacker-2cef2fd6c208/lib/webpacker/configuration.rb:88:in `data'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/webpacker-2cef2fd6c208/lib/webpacker/configuration.rb:84:in `fetch'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/webpacker-2cef2fd6c208/lib/webpacker/configuration.rb:23:in `source_path'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/webpacker-2cef2fd6c208/lib/webpacker/railtie.rb:94:in `block in <class:Engine>'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/initializable.rb:32:in `instance_exec'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/initializable.rb:32:in `run'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/initializable.rb:61:in `block in run_initializers'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/initializable.rb:60:in `run_initializers'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/application.rb:363:in `initialize!'
/Users/jorge/Projects/craiglist2/config/environment.rb:5:in `<main>'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/zeitwerk-2.2.0/lib/zeitwerk/kernel.rb:23:in `require'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/activesupport/lib/active_support/dependencies.rb:325:in `block in require'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/activesupport/lib/active_support/dependencies.rb:291:in `load_dependency'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/activesupport/lib/active_support/dependencies.rb:325:in `require'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/application.rb:339:in `require_environment!'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/application.rb:515:in `block in run_tasks_blocks'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/command.rb:48:in `invoke'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/railties/lib/rails/commands.rb:18:in `<main>'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/activesupport/lib/active_support/dependencies.rb:325:in `block in require'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/activesupport/lib/active_support/dependencies.rb:291:in `load_dependency'
/Users/jorge/.rvm/gems/ruby-2.6.5/bundler/gems/rails-e01bf7f88f7d/activesupport/lib/active_support/dependencies.rb:325:in `require'
/Users/jorge/Projects/craiglist2/bin/rails:9:in `<top (required)>'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `load'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `call'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/client/command.rb:7:in `call'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/client.rb:30:in `run'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/bin/spring:49:in `<top (required)>'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `load'
/Users/jorge/.rvm/gems/ruby-2.6.5/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `<top (required)>'
/Users/jorge/Projects/craiglist2/bin/spring:15:in `require'
/Users/jorge/Projects/craiglist2/bin/spring:15:in `<top (required)>'
./bin/rails:3:in `load'
./bin/rails:3:in `<main>'
Tasks: TOP => app:template => environment
(See full trace by running task with --trace)

System configuration

Rails version: 6.0 Ruby version: 2.6.5

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (13 by maintainers)

Most upvoted comments

As a temporary solution you can create and fill webpacker.yml manually and run rails webpacker:install again.

But @JorgeDDW is trying to rails new; not webpacker:install?

Yes, it must be running after project creation

  1. Initially run rails new ... — skip errors, anyway, the project already will be created.
  2. Create config/webpacker.yml manually
  3. Fill it with contents (for example)
  4. Change directory to project root
  5. Run rails webpacker:install, decline our existing webpacker.yml overwrite

@JorgeDDW is right, I reproduced the issue

This same webpacker errors occurs under Rails 6.0.2.1 and webpacker 4.2.2 with a brand new rails new (no arguments other than the app name) generated application anytime bin/rails is called (even without arguments):

rails command stacktrace
$ bin/rails
The most common rails commands are:
 generate     Generate new code (short-cut alias: "g")
 console      Start the Rails console (short-cut alias: "c")
 server       Start the Rails server (short-cut alias: "s")
 test         Run tests except system tests (short-cut alias: "t")
 test:system  Run system tests
 dbconsole    Start a console for the database specified in config/database.yml
              (short-cut alias: "db")

new Create a new Rails application. “rails new my_app” creates a new application called MyApp in “./my_app”

All commands can be run with -h (or --help) for more information. In addition to those commands, there are:

Traceback (most recent call last): 62: from bin/rails:4:in <main>' 61: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in require’ 60: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:291:in load_dependency' 59: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in block in require’ 58: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in require' 57: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in require_with_bootsnap_lfi’ 56: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in register' 55: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in block in require_with_bootsnap_lfi’ 54: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in require' 53: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/commands.rb:18:in <main>’ 52: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/command.rb:46:in invoke' 51: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/command/base.rb:69:in perform’ 50: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor.rb:392:in dispatch' 49: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in invoke_command’ 48: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:in run' 47: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/help/help_command.rb:11:in help’ 46: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/command.rb:86:in print_commands' 45: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/command.rb:96:in commands’ 44: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/command.rb:96:in flat_map' 43: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/command.rb:96:in each’ 42: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/rake/rake_command.rb:12:in printing_commands' 41: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/rake/rake_command.rb:42:in formatted_rake_tasks’ 40: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/rake/rake_command.rb:33:in rake_tasks' 39: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/command/actions.rb:15:in require_application_and_environment!’ 38: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/command/actions.rb:28:in require_environment!' 37: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/application.rb:339:in require_environment!’ 36: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in require' 35: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:291:in load_dependency’ 34: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in block in require' 33: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in require’ 32: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in require' 31: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in require_with_bootsnap_lfi’ 30: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in register' 29: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in block in require_with_bootsnap_lfi’ 28: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in require' 27: from /Users/olivierlacan/dev/sandbox/plant/config/environment.rb:5:in <main>’ 26: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/application.rb:363:in initialize!' 25: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:60:in run_initializers’ 24: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tsort.rb:205:in tsort_each' 23: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tsort.rb:226:in tsort_each’ 22: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tsort.rb:347:in each_strongly_connected_component' 21: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tsort.rb:347:in call’ 20: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tsort.rb:347:in each' 19: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tsort.rb:349:in block in each_strongly_connected_component’ 18: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tsort.rb:431:in each_strongly_connected_component_from' 17: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component’ 16: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tsort.rb:228:in block in tsort_each' 15: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:61:in block in run_initializers’ 14: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in run' 13: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in instance_exec’ 12: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/railtie.rb:84:in block in <class:Engine>' 11: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker.rb:35:in bootstrap’ 10: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/commands.rb:25:in bootstrap' 9: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/manifest.rb:18:in refresh’ 8: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/manifest.rb:83:in load' 7: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:51:in public_manifest_path’ 6: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:47:in public_output_path' 5: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:43:in public_path’ 4: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:84:in fetch' 3: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:88:in data’ 2: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:92:in load' 1: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:92:in read’ /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:92:in read': No such file or directory @ rb_sysopen - /Users/olivierlacan/dev/sandbox/plant/config/webpacker.yml (Errno::ENOENT) 61: from bin/rails:4:in <main>’ 60: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in require' 59: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:291:in load_dependency’ 58: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in block in require' 57: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in require’ 56: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in require_with_bootsnap_lfi' 55: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in register’ 54: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in block in require_with_bootsnap_lfi' 53: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in require’ 52: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/commands.rb:18:in <main>' 51: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/command.rb:46:in invoke’ 50: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/command/base.rb:69:in perform' 49: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor.rb:392:in dispatch’ 48: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in invoke_command' 47: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:in run’ 46: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/help/help_command.rb:11:in help' 45: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/command.rb:86:in print_commands’ 44: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/command.rb:96:in commands' 43: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/command.rb:96:in flat_map’ 42: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/command.rb:96:in each' 41: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/rake/rake_command.rb:12:in printing_commands’ 40: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/rake/rake_command.rb:42:in formatted_rake_tasks' 39: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/rake/rake_command.rb:33:in rake_tasks’ 38: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/command/actions.rb:15:in require_application_and_environment!' 37: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/command/actions.rb:28:in require_environment!’ 36: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/application.rb:339:in require_environment!' 35: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in require’ 34: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:291:in load_dependency' 33: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in block in require’ 32: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in require' 31: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in require’ 30: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in require_with_bootsnap_lfi' 29: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in register’ 28: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in block in require_with_bootsnap_lfi' 27: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in require’ 26: from /Users/olivierlacan/dev/sandbox/plant/config/environment.rb:5:in <main>' 25: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/application.rb:363:in initialize!’ 24: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:60:in run_initializers' 23: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tsort.rb:205:in tsort_each’ 22: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tsort.rb:226:in tsort_each' 21: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tsort.rb:347:in each_strongly_connected_component’ 20: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tsort.rb:347:in call' 19: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tsort.rb:347:in each’ 18: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tsort.rb:349:in block in each_strongly_connected_component' 17: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tsort.rb:431:in each_strongly_connected_component_from’ 16: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component' 15: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tsort.rb:228:in block in tsort_each’ 14: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:61:in block in run_initializers' 13: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in run’ 12: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in instance_exec' 11: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/railtie.rb:84:in block in class:Engine’ 10: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker.rb:35:in bootstrap' 9: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/commands.rb:25:in bootstrap’ 8: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/manifest.rb:18:in refresh' 7: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/manifest.rb:83:in load’ 6: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:51:in public_manifest_path' 5: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:47:in public_output_path’ 4: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:43:in public_path' 3: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:84:in fetch’ 2: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:88:in data' 1: from /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:91:in load’ /Users/olivierlacan/dev/sandbox/plant/vendor/bundle/ruby/2.6.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:95:in `rescue in load’: Webpacker configuration file not found /Users/olivierlacan/dev/sandbox/plant/config/webpacker.yml. Please run rails webpacker:install Error: No such file or directory @ rb_sysopen - /Users/olivierlacan/dev/sandbox/plant/config/webpacker.yml (RuntimeError)

To be fair, I’m experimenting with a weird setup in which I’m using the macOS system Ruby (hence /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 in the trace) and I’ve setup bundler to install to vendor/bundle. Here’s the repro app as-is although it’s a stock Rails 6.0.2.1 app aside from the specific bundle install --path vendor/bundle instruction.

Small info from a rails newcomer: on Friday 8th 2019 the default rails new blog from the rails getting started was working. Today Tuesday 12th 2019 the default rails new blog is no more working. Should we update the getting started guide with the temporary solution so that new users right now are not bitten by this bug?

PS: I use the standard rails command, not edge, just the default rails command of 6.0.1 (current stable).

Released 4.2.0

Thanks for raising the issue, it seems to have worked when I tested locally after release but I can reproduce now. Will look into it.

As a temporary solution you can create and fill webpacker.yml manually and run rails webpacker:install again.