Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 6 local server booting : RAILS_ENV=development environment is not defined

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.

like image 569
Ruff9 Avatar asked Aug 30 '19 09:08

Ruff9


1 Answers

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.

like image 108
dolagun Avatar answered Oct 17 '22 16:10

dolagun