Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 305
jacob_g Avatar asked Jul 03 '20 17:07

jacob_g


2 Answers

Is there 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.

like image 197
Daniel Martínez Sarta Avatar answered Nov 20 '22 16:11

Daniel Martínez Sarta


Using an older version of sass solves the issue. I advise changing 6 to 5.1.0 in the Gemfile. This file will be located in your rails folder (the name you used when creating a new rails)

I think Rails 6 is not compatible with Sass 6.0.0's dependencies for some reason.

like image 3
leet Avatar answered Nov 20 '22 16:11

leet