Published on :Jul 08, 2020

Issue: Deployment Failure: assets:precompile

 deploy:assets:precompile
      01 $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile
      01 Usage: yarn [options]
      01
      01 yarn: error: no such option: --no-progress

I was trying to deploy rails 6 app on ec2 server using capistrano when precompile failure lead to whole deploymentt failure. I was facing this issue only in server so I started digging what I was doing different on server.

Turns out, On server my yarn command came from cmdtest. So I uninstalled cmdtest and installed yarn.The steps I followed is as below.

Configure the repository:

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

Install Yarn:

sudo apt update && sudo apt install yarn

Then I ran the cap:production:deploy and it worked.

Did you also face similar issue while deploying rails apps to ubuntu with webpack enabled? Did this help? Please let me know your findings in the comment section below.

Loading

Interested In Working Together ?

Over 8 years of industry experience in Game/Frontend
development with special interest.
Book your Consultation
© Prakash Poudel