Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sass is installed, but command cannot be found

I have a Cpanel-based hosting plan with my provider. I've managed to install both Compass and Sass by using Putty and everything seems to be fine, however when I try to use it I get sass: command not found from the terminal.

I understand that this is probably due to the fact that Sass/Compass are not referred to in environment variables but so far have been unable to find a way to get this to work. I don't have sudo access to the server and have read that I can (maybe) add the PATH manually but I'm not having much luck.

like image 472
Mat Richardson Avatar asked Jan 02 '13 12:01

Mat Richardson


People also ask

How do I know if Sass is installed in CMD?

The “-v” command checks the version of SASS you have installed. If you don't have it installed, it will come back as not installed.

How do I run a Sass command?

Running Sass in the Command Line Type “pwd” (aka “print working directory” to make sure you're in the right spot. Once you have your Sass files written, you're ready to go! The command to run Sass is sass --watch input. scss output.

How do you check if node-Sass is installed globally?

You can use npx to run node-sass. npx will check if you have a global path to the npm package, and if not, it will temporaily download and execute it. For instance, to run node-sass and check version.


1 Answers

  1. Make sure you have Ruby & RubyGems installed:

  2. Make sure your GEM_HOME's bin directory is on your path:

    $ echo $PATH | grep $GEM_HOME
    

    2.1. If it isn't, then:

    $ echo "export PATH=$PATH:$GEM_HOME/bin" >> "~/.bash_profile"
    
  3. Install the sass RubyGem package

    gem install sass
    
like image 68
rounce Avatar answered Oct 07 '22 18:10

rounce