Since Rails 6, Webpacker is the default JavaScript compiler. So you’ll also have to set it up before starting your Rails server.
- Install
yarnusing your OS package manager, or take a look at https://yarnpkg.com/en/docs/install - Set it up
rails webpacker:install - Make sure all packages are up to date
yarn install --check-files - Start your Rails server
rails s
Enjoy!