17

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.

2
  • 1
    I have the same problem in EC2 when bundle, it stop at Installing sassc 2.4.0 with native extensions.
    – PKul
    Commented Aug 14, 2020 at 5:15
  • 2
    Facing same issue. Following along the thread github.com/sass/sassc-ruby/issues/189
    – Mashhood
    Commented Aug 17, 2020 at 18:39

2 Answers 2

15

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.

3
  • 1
    This seems to be the core of the problem. Using an older version of sassc solves the issue.
    – leet
    Commented Dec 5, 2020 at 22:49
  • Could you please tell me how was it done ?? forgive me for my ignorance Commented Apr 27, 2022 at 9:12
  • @user2609074 add gem 'sassc', '~> 2.1.0' to your gemfile, run bundle update sassc and then install again.
    – TKTurbo
    Commented Dec 16, 2022 at 14:09
3

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.