code-qualityentrepreneurial

How to solve Deployment Failure-`assets:precompile`

I was trying to deploy rails 6 app on ec2 server using capistrano when precompile failure lead to whole deploymentt failure. I had to uninstall cmdtest and install yarn

railsyarn
How to solve Deployment Failure-`assets:precompile`

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.

Press Esc to return to the article
About the author

Prakash Poudel Sharma

Independent product manager & agentic engineering consultant

I'm an independent product manager, founder, and software builder based in Kathmandu. I help teams make product decisions and adopt agentic software development, drawing on over a decade of building software. I write about product thinking, engineering with AI, and hands-on experiments.

Keep reading

More on this

Join the conversation0 comments

What did you take away?

Thoughts, pushback, or a story of your own? Drop a reply below — I read every one.

Comments are powered by Disqus. By posting you agree to theirterms.

—
0:000:00