Webpacker configuration file not found - Rails 6.0.0

I was trying to run "rails s" to run my server then I suddenly run into an error that says webpacker configuration not found.

Here's the info:

boot@noki-K54C:~/Desktop/app$ rails s
=> Booting Puma
=> Rails 6.0.0 application starting in development 
=> Run `rails server --help` for more startup options
RAILS_ENV=development environment is not defined in config/webpacker.yml, falling back to production environment
Exiting
<b>Traceback</b> (most recent call last):
    79: from bin/rails:3:in `&lt;main&gt;&apos;
    78: from bin/rails:3:in `load&apos;
    77: from /home/app/Desktop/jonabell/bin/spring:15:in `&lt;top (required)&gt;&apos;
    76: from /home/app/Desktop/jonabell/bin/spring:15:in `require&apos;
    75: from /home/app/.rvm/gems/ruby-2.6.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `&lt;top (required)&gt;&apos;
    74: from /home/app/.rvm/gems/ruby-2.6.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `load&apos;
    73: from /home/app/.rvm/gems/ruby-2.6.0/gems/spring-2.1.0/bin/spring:49:in `&lt;top (required)&gt;&apos;
    72: from /home/app/.rvm/gems/ruby-2.6.0/gems/spring-2.1.0/lib/spring/client.rb:30:in `run&apos;
    71: from /home/app/.rvm/gems/ruby-2.6.0/gems/spring-2.1.0/lib/spring/client/command.rb:7:in `call&apos;
    70: from /home/app/.rvm/gems/ruby-2.6.0/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `call&apos;
    69: from /home/app/.rvm/gems/ruby-2.6.0/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `load&apos;
    68: from /home/app/Desktop/jonabell/bin/rails:9:in `&lt;top (required)&gt;&apos;
    67: from /home/app/.rvm/gems/ruby-2.6.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `require&apos;
    66: from /home/app/.rvm/gems/ruby-2.6.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:291:in `load_dependency&apos;
    65: from /home/app/.rvm/gems/ruby-2.6.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `block in require&apos;
    64: from /home/app/.rvm/gems/ruby-2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require&apos;
    63: from /home/app/.rvm/gems/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&apos;
    62: from /home/app/.rvm/gems/ruby-2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register&apos;
    61: from /home/app/.rvm/gems/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&apos;
    60: from /home/app/.rvm/gems/ruby-2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require&apos;
    59: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/commands.rb:18:in `&lt;main&gt;&apos;
    58: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/command.rb:46:in `invoke&apos;
    57: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/command/base.rb:65:in `perform&apos;
    56: from /home/app/.rvm/gems/ruby-2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch&apos;
    55: from /home/app/.rvm/gems/ruby-2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command&apos;
    54: from /home/app/.rvm/gems/ruby-2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run&apos;
    53: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/commands/server/server_command.rb:138:in `perform&apos;
    52: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/commands/server/server_command.rb:138:in `tap&apos;
    51: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/commands/server/server_command.rb:147:in `block in perform&apos;
    50: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/commands/server/server_command.rb:37:in `start&apos;
    49: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/commands/server/server_command.rb:77:in `log_to_stdout&apos;
    48: from /home/app/.rvm/gems/ruby-2.6.0/gems/rack-2.0.7/lib/rack/server.rb:354:in `wrapped_app&apos;
    47: from /home/app/.rvm/gems/ruby-2.6.0/gems/rack-2.0.7/lib/rack/server.rb:219:in `app&apos;
    46: from /home/app/.rvm/gems/ruby-2.6.0/gems/rack-2.0.7/lib/rack/server.rb:319:in `build_app_and_options_from_config&apos;
    45: from /home/app/.rvm/gems/ruby-2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:40:in `parse_file&apos;
    44: from /home/app/.rvm/gems/ruby-2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:49:in `new_from_string&apos;
    43: from /home/app/.rvm/gems/ruby-2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:49:in `eval&apos;
    42: from config.ru:in `&lt;main&gt;&apos;
    41: from config.ru:in `new&apos;
    40: from /home/app/.rvm/gems/ruby-2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in `initialize&apos;
    39: from /home/app/.rvm/gems/ruby-2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in `instance_eval&apos;
    38: from config.ru:3:in `block in &lt;main&gt;&apos;
    37: from /home/app/.rvm/gems/ruby-2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `require_relative&apos;
    36: from /home/app/.rvm/gems/ruby-2.6.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `require&apos;
    35: from /home/app/.rvm/gems/ruby-2.6.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:291:in `load_dependency&apos;
    34: from /home/app/.rvm/gems/ruby-2.6.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `block in require&apos;
    33: from /home/app/.rvm/gems/ruby-2.6.0/gems/zeitwerk-2.1.10/lib/zeitwerk/kernel.rb:23:in `require&apos;
    32: from /home/app/.rvm/gems/ruby-2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require&apos;
    31: from /home/app/.rvm/gems/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&apos;
    30: from /home/app/.rvm/gems/ruby-2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register&apos;
    29: from /home/app/.rvm/gems/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&apos;
    28: from /home/app/.rvm/gems/ruby-2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require&apos;
    27: from /home/app/Desktop/jonabell/config/environment.rb:5:in `&lt;main&gt;&apos;
    26: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/application.rb:363:in `initialize!&apos;
    25: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/initializable.rb:60:in `run_initializers&apos;
    24: from /usr/share/rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each&apos;
    23: from /usr/share/rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each&apos;
    22: from /usr/share/rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component&apos;
    21: from /usr/share/rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/tsort.rb:347:in `call&apos;
    20: from /usr/share/rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/tsort.rb:347:in `each&apos;
    19: from /usr/share/rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component&apos;
    18: from /usr/share/rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from&apos;
    17: from /usr/share/rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component&apos;
    16: from /usr/share/rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each&apos;
    15: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/initializable.rb:61:in `block in run_initializers&apos;
    14: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/initializable.rb:32:in `run&apos;
    13: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/initializable.rb:32:in `instance_exec&apos;
    12: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/railtie.rb:84:in `block in &lt;class:Engine&gt;&apos;
    11: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker.rb:27:in `bootstrap&apos;
    10: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/commands.rb:14:in `bootstrap&apos;
     9: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/manifest.rb:18:in `refresh&apos;
     8: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/manifest.rb:83:in `load&apos;
     7: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/configuration.rb:47:in `public_manifest_path&apos;
     6: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/configuration.rb:43:in `public_output_path&apos;
     5: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/configuration.rb:39:in `public_path&apos;
     4: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/configuration.rb:80:in `fetch&apos;
     3: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/configuration.rb:84:in `data&apos;
     2: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/configuration.rb:88:in `load&apos;
     1: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/configuration.rb:88:in `read&apos;
/home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/configuration.rb:88:in `read&apos;: <b>No such file or directory @ rb_sysopen - /home/app/Desktop/jonabell/config/webpacker.yml (</b><u style="text-decoration-style:single"><b>Errno::ENOENT</b></u><b>)</b>
    78: from bin/rails:3:in `&lt;main&gt;&apos;
    77: from bin/rails:3:in `load&apos;
    76: from /home/app/Desktop/jonabell/bin/spring:15:in `&lt;top (required)&gt;&apos;
    75: from /home/app/Desktop/jonabell/bin/spring:15:in `require&apos;
    74: from /home/app/.rvm/gems/ruby-2.6.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `&lt;top (required)&gt;&apos;
    73: from /home/app/.rvm/gems/ruby-2.6.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `load&apos;
    72: from /home/app/.rvm/gems/ruby-2.6.0/gems/spring-2.1.0/bin/spring:49:in `&lt;top (required)&gt;&apos;
    71: from /home/app/.rvm/gems/ruby-2.6.0/gems/spring-2.1.0/lib/spring/client.rb:30:in `run&apos;
    70: from /home/app/.rvm/gems/ruby-2.6.0/gems/spring-2.1.0/lib/spring/client/command.rb:7:in `call&apos;
    69: from /home/app/.rvm/gems/ruby-2.6.0/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `call&apos;
    68: from /home/app/.rvm/gems/ruby-2.6.0/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `load&apos;
    67: from /home/app/Desktop/jonabell/bin/rails:9:in `&lt;top (required)&gt;&apos;
    66: from /home/app/.rvm/gems/ruby-2.6.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `require&apos;
    65: from /home/app/.rvm/gems/ruby-2.6.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:291:in `load_dependency&apos;
    64: from /home/app/.rvm/gems/ruby-2.6.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `block in require&apos;
    63: from /home/app/.rvm/gems/ruby-2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require&apos;
    62: from /home/app/.rvm/gems/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&apos;
    61: from /home/app/.rvm/gems/ruby-2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register&apos;
    60: from /home/app/.rvm/gems/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&apos;
    59: from /home/app/.rvm/gems/ruby-2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require&apos;
    58: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/commands.rb:18:in `&lt;main&gt;&apos;
    57: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/command.rb:46:in `invoke&apos;
    56: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/command/base.rb:65:in `perform&apos;
    55: from /home/app/.rvm/gems/ruby-2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch&apos;
    54: from /home/app/.rvm/gems/ruby-2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command&apos;
    53: from /home/app/.rvm/gems/ruby-2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run&apos;
    52: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/commands/server/server_command.rb:138:in `perform&apos;
    51: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/commands/server/server_command.rb:138:in `tap&apos;
    50: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/commands/server/server_command.rb:147:in `block in perform&apos;
    49: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/commands/server/server_command.rb:37:in `start&apos;
    48: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/commands/server/server_command.rb:77:in `log_to_stdout&apos;
    47: from /home/app/.rvm/gems/ruby-2.6.0/gems/rack-2.0.7/lib/rack/server.rb:354:in `wrapped_app&apos;
    46: from /home/app/.rvm/gems/ruby-2.6.0/gems/rack-2.0.7/lib/rack/server.rb:219:in `app&apos;
    45: from /home/app/.rvm/gems/ruby-2.6.0/gems/rack-2.0.7/lib/rack/server.rb:319:in `build_app_and_options_from_config&apos;
    44: from /home/app/.rvm/gems/ruby-2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:40:in `parse_file&apos;
    43: from /home/app/.rvm/gems/ruby-2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:49:in `new_from_string&apos;
    42: from /home/app/.rvm/gems/ruby-2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:49:in `eval&apos;
    41: from config.ru:in `&lt;main&gt;&apos;
    40: from config.ru:in `new&apos;
    39: from /home/app/.rvm/gems/ruby-2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in `initialize&apos;
    38: from /home/app/.rvm/gems/ruby-2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in `instance_eval&apos;
    37: from config.ru:3:in `block in &lt;main&gt;&apos;
    36: from /home/app/.rvm/gems/ruby-2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `require_relative&apos;
    35: from /home/app/.rvm/gems/ruby-2.6.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `require&apos;
    34: from /home/app/.rvm/gems/ruby-2.6.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:291:in `load_dependency&apos;
    33: from /home/app/.rvm/gems/ruby-2.6.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `block in require&apos;
    32: from /home/app/.rvm/gems/ruby-2.6.0/gems/zeitwerk-2.1.10/lib/zeitwerk/kernel.rb:23:in `require&apos;
    31: from /home/app/.rvm/gems/ruby-2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require&apos;
    30: from /home/app/.rvm/gems/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&apos;
    29: from /home/app/.rvm/gems/ruby-2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register&apos;
    28: from /home/app/.rvm/gems/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&apos;
    27: from /home/app/.rvm/gems/ruby-2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require&apos;
    26: from /home/app/Desktop/jonabell/config/environment.rb:5:in `&lt;main&gt;&apos;
    25: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/application.rb:363:in `initialize!&apos;
    24: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/initializable.rb:60:in `run_initializers&apos;
    23: from /usr/share/rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each&apos;
    22: from /usr/share/rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each&apos;
    21: from /usr/share/rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component&apos;
    20: from /usr/share/rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/tsort.rb:347:in `call&apos;
    19: from /usr/share/rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/tsort.rb:347:in `each&apos;
    18: from /usr/share/rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component&apos;
    17: from /usr/share/rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from&apos;
    16: from /usr/share/rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component&apos;
    14: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/initializable.rb:61:in `block in run_initializers&apos;
    13: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/initializable.rb:32:in `run&apos;
    12: from /home/app/.rvm/gems/ruby-2.6.0/gems/railties-6.0.0/lib/rails/initializable.rb:32:in `instance_exec&apos;
    11: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/railtie.rb:84:in `block in &lt;class:Engine&gt;&apos;
    10: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker.rb:27:in `bootstrap&apos;
     9: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/commands.rb:14:in `bootstrap&apos;
     8: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/manifest.rb:18:in `refresh&apos;
     7: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/manifest.rb:83:in `load&apos;
     6: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/configuration.rb:47:in `public_manifest_path&apos;
     5: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/configuration.rb:43:in `public_output_path&apos;
     4: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/configuration.rb:39:in `public_path&apos;
     3: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/configuration.rb:80:in `fetch&apos;
     2: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/configuration.rb:84:in `data&apos;
     1: from /home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/configuration.rb:87:in `load&apos;
/home/app/.rvm/gems/ruby-2.6.0/gems/webpacker-4.0.7/lib/webpacker/configuration.rb:91:in `rescue in load&apos;: <b>Webpacker configuration file not found /home/app/Desktop/jonabell/config/webpacker.yml. Please run rails webpacker:install Error: No such file or directory @ rb_sysopen - /home/app/Desktop/jonabell/config/webpacker.yml (</b><u style="text-decoration-style:single"><b>RuntimeError</b></u><b>)</b>
boot@noki-K54C:~/Desktop/app$ 

I already check the version of rails and its 6.0.0 my ruby version is 2.6.0.

Tried to search the web and try a few solutions but did not work out for me.

Any idea what am I missing?


Solution 1:

Since Rails 6, Webpacker is the default JavaScript compiler. So you'll also have to set it up before starting your Rails server.

  1. Install yarn using your OS package manager, or take a look at https://yarnpkg.com/en/docs/install
  2. Set it up rails webpacker:install
  3. Make sure all packages are up to date yarn install --check-files
  4. Start your Rails server rails s

Enjoy!

Solution 2:

To add onto what has been said, make sure to check the error message for instructions on how to go about resolving the issue. In this case the error says:

..."Please run rails webpacker:install"...

Once you run rails webpacker:install you'll see the error that you don't have yarn installed, in which case you can go to the Installation Instructions to figure out how to install yarn for your operating system. For unix (I'm on a unix Amazon Cloud9 environment) I had to run:

curl -o- -L https://yarnpkg.com/install.sh | bash

Then I was able to successfully run rails webpacker:install and then once I ran rails server I saw the error:

========================================
  Your Yarn packages are out of date!
  Please run `yarn install --check-files` to update.
========================================

After that was installed, rails s worked just fine.

I hope that gives more insight into how to go about "debugging" the issue!

Solution 3:

After installing Rails, and setting up new application, once i tried to run rails server, i faced this error. I checked config/ and webpack configuration file was missing.

Following way i could fix it and made it working 100%.

Go to root directory of your rails application and follow instruction below.

Install webpacker

bundle exec rails webpacker:install

command.

Conditionally

  • If your system doesn't have nodejs, you need to install nodejs from https://nodejs.org/en/download/

  • Once Nodejs is installed, it might throw another error, yarn not installed in that case, Run command

npm install --global yarn

and after sorting all above, i was able to run rails server and thus working.

enter image description here


Above command was performed in MacOS Mojave, Please check corresponding OS command to install both node/yarn before proceeding.

To see complete installation and running instruction you can check: https://medium.com/intelligent-computing/up-and-running-your-first-ruby-on-rails-app-with-troubleshooting-83e694d87605