Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails precompile assets Yarn executable was not detected

I have a Rails project that we converted from Rails 5.0 to Rails 5.1.0. When I try to precompile the assets, I get the following error message:

Yarn executable was not detected in the system.
Download Yarn at https://yarnpkg.com/en/docs/install

Everything I read from an internet search says yarn and webpacker comes with Rails 5.1. I get the following from check the rails version.

$rails --version
Rails 5.1.0

How do I fix this? I'd also like to know what is happening.

like image 393
Marlin Pierce Avatar asked Aug 03 '17 13:08

Marlin Pierce


2 Answers

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

like image 54
AC de Souza Avatar answered Sep 24 '22 04:09

AC de Souza


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

like image 36
Mark Robinson Avatar answered Sep 21 '22 04:09

Mark Robinson