Rails precompile assets Yarn executable was not detected

Rails 5.1 comes with SUPPORT for yarn and webpack, but you need to install them yourself. Yarn is a package manager and webpack is a package.

Follow instruction at https://yarnpkg.com/lang/en/docs/install/ to install Yarn in your system and then add webpack to your project like:

yarn add --dev webpack webpack-dev-server

Additionally, the message you're seeing is warning, rather than straight up error. If you do not need to use any of the fancy js packages, you can just use good ol' asset pipeline

If you're trying to deploy a Rails 5.2 project with Yarn at Heroku, I suggest you look into the Buildpacks order.

To make it work here, I needed the heroku/NodeJS to be placed before the heroku/Ruby.

enter image description here

You could just remove bin/yarn from your App directory if you're not using yarn/webpacker to avoid the log message.