Tags
Deployment, devops, rails, React, ruby, software-development
Today I was deploying one of my application build with Rails 6 and React. During the deployment, everything went well but when it came to assets pre-compilation the deployment start failing. After checking the logs I found that the YARN package was not installed properly which is needed for React-Rails application.
Failure/Error:
deploy:assets:precompile
01 /home/deploy/current exec bundle exec rake assets:precompile
01 Usage: yarn [options]
01
01 yarn: error: no such option: --no-progress
FIX
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
After doing proper installation of Yarn package, I ran the Capistrano deployment command:
BASTION=true cap production deploy –traceĀ
Whoo!, the application is running in Production mode.
Happy Learning.