Install JavaScript dependencies during setup
In order to execute the webpacker:install
command executed during the
project’s rails new
command execution, the development environment
required a semi-current version of NodeJS available on the system.
The ASDF Version Manager is a useful tool that manages versions of system-level dependencies, like Ruby and NodeJS.
To integrate with ASDF, this commit declares a
.tool-versions
file that specifies the NodeJS
version to be 11.7.0
.
The rails new
command that generated this project also generated a
yarn install
line in the project’s bin/setup
script
that is initially commented out.
To ensure that JavaScript dependencies are available to the development
environment, this commit uncomments that line in the
bin/setup
script to also run yarn
install
when installing the application’s dependencies.