Error when trying precompile assets, getting yarn error with rails

Viewed 392

rails -v: Rails 6.1.0

ruby -v: ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x64-mingw32]

I'm having this error when I try to run rails assets:precompile

rails aborted!
Errno::ENOEXEC: Exec format error - C:/Users/trynot/Desktop/prolife/bin/yarn --version

Tasks: TOP => assets:precompile => yarn:install
(See full trace by running task with --trace)

What I've tried:

I already uninstalled and reinstalled all my gems, tried to update all my gems, tried to generate a new project with the flags --skip-webpack-install, tried removing the file yarn from bin, and tried to reinstall yarn. Same problem!

1 Answers

This issue is resolved on this commit https://github.com/rails/rails/commit/5c8805034f5f59b7278f895fca7b6fd7dfda7af5#diff-7c64b5585b553fe2873f6b3cee2675a6d63997f3c7af82ccf23c1073773c40d3

Related