Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I stop using ruby Sass and start using Dart-sass. Uninstall-Install them respectively

This question needs 3 questions answered for completeness:

  1. How do I remove ruby sass?
  2. How do I install dart-sass?
  3. How do I re-point the sass command at dart-sass?

I may answer these below but my notes may be wrong, unfortunately the sass website does not provide very specific instructions on how to install and how to move from ruby sass to dart-sass. While writing this I have found some answers I will post, but feel free to add your better answer or correct me, mine may not be a good answer but hopefully it helps someone else.

Background before writing this:

I am on Ubuntu I have been searching for days, on the best SASS solution (paid maybe the best, but I hate being disappointed by poor support after I fork out money). All documentation I have read ends with me using dart-sass that it is the only form of sass going forwards. Ruby & Node are no longer supported. Codekit for Mac looks good, and Prepros also looks very good may try this for its other features, but I don't want to pay, just yet, and in any case I assume they are just using libsass anyway. I am using VScode, i moved from sublime. I am getting many errors with the different recent bootstrap versions (4.0.0-a2 - 4.3.1) So once I find the correct dart-sass, then I can focus on finding the correct bootstrap. Please feel free to answer this question if you know the specifics, again it is not commonly documented.

Currently Using ruby sass:

Currently I can run a sass watch command sass --watch mysass:mycss and my css compiles (sometimes with errors) at least tries, so sass watch is working. I can check the version sass --version and I get: Ruby Sass 3.7.4 I have done an apt-get remove sass, and it appears to uninstall but no I can still run sass watch.

  1. I think I will need to do a git clone from github with the main of dart-sass.

  2. I think I need to ad a path variable.

So now that I have some answers I will start forming my answer below, but please feel free to tell me I am wrong. Cheers, SASS NOOB

like image 690
TheArchitecta Avatar asked Feb 02 '26 02:02

TheArchitecta


1 Answers

  1. Uninstall Ruby Sass

    gem uninstall sass
    

possibly have to manually (I did not have to) remove:

/usr/local/bin/sass

/usr/local/bin/sass-convert

/usr/local/bin/scss

Thanks to Steve Griffith Channel https://www.youtube.com/watch?v=5jZGo_k8Rd0&t=305s

  1. Clone was wrong, that is the issue why dart-sass wouldn't run:

instead download your preferred tar.gz version to Downloads, I am gong with the latest, then extract to your preferred location

 $ cd /usr/local/bin

 $ sudo tar -zxvf ~/Downloads/dart-sass-1.26.0-test.3-linux-x64.tar.gz
  1. Setup Path

     $ sudo nano ~/.bashrc
    

add new line

export PATH="/usr/local/bin/dart-sass:$PATH"

OK tested sass now runs dart-sass, how well is yet to be determined, I may have to go back a few versions??? And then which bootstrap, I might follow up with this.

like image 121
TheArchitecta Avatar answered Feb 04 '26 16:02

TheArchitecta