10

I just created a new Rails 6 app. Everything went fine until I tried to launch the local server with rails s, and got this error message :

RAILS_ENV=development environment is not defined in config/webpacker.yml, falling back to production environment
Exiting

and

Webpacker configuration file not found /Users/remy/dev/voter/config/webpacker.yml. Please run rails webpacker:install Error: No such file or directory @ rb_sysopen - /Users/remy/dev/voter/config/webpacker.yml (RuntimeError)

But when I run rails webpacker:install I still have the error.

Ruff9
  • 1,163
  • 15
  • 34

1 Answers1

13

That error usually hints at an unmet Yarn dependency. Try installing or updating Yarn before running rails webpacker:install.

Here are the Yarn Docs for quick reference just in case.

dolagun
  • 156
  • 1
  • 4