ruby-on-railsamazon-ec2deploymentcapistranoubuntu-20.04

Rails: Why is bundle install frozen up by sassc 2.4.0


I'm trying to deploy my rails app with Capistrano, however, the deploy process (cap production deploy) is constantly held up at the line:

$HOME/.rbenv/bin/rbenv exec bundle install --path /home/deploy/appname/shared/bundle --jobs 4 --without development test --deployment -- quiet

When I ssh into the server and run the same command in the latest release without the --quiet flag, I see most gems are installed, but when it gets to

Installing sassc 2.4.0 with native extensions

it freezes. If I monitor the CPU with cloud watch (I'm using an EC2 instance running Ubuntu 20.04), I see it also spikes. I've tried removing all dependencies that rely on sassc, but this has proven a really big headache and seems like it shouldn't be necessary. Some dependent gems include my CMS (comfortable mexican sofa), webpacker, and some node dependencies.

I've also tried to install sassc using

apt-get install sassc

to no avail (it installs, but bundle install still freezes).

Does anyone have any idea why this gem is having so much trouble installing? Any workarounds/fixes? By the way, the dependencies install and run fine locally on my macOS Catalina machine.

Bonus: Here's the CPU usage when I run the deploy script: enter image description here

credit count: enter image description here

credit balance: enter image description here

Maybe it's simply not possible to install sassc with the free EC2 plan?

Thanks.


Solution

  • There is a problem with sassc version 2.4.0 and rails 6. I changed the version in the Gemfile to 2.1.0 and now it install fast and don't stucks on docker build.