Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sass --watch not updating after initial launch (sass 3.1.16)

Tags:

css

sass

ruby

I am working with sass to write the css for a simple static website I am working on. I have run sass --watch custom.scss:custom.css which compiles fine on launch with the message:

Sass is watching for changes. Press Ctrl-C to stop.

overwrite custom.css

However, whenever I update the .scss file, nothing happens. I haven't used SASS outside the context of a rails app before, so I'm wondering if I am missing something?

My scss file is incredibly simple as well, so I doubt it is choking on anything, especially since it works on the first run.

sass -v reports Sass 3.1.16 (Brainy Betty), on Lion 10.7.2

like image 206
waffl Avatar asked Apr 26 '12 13:04

waffl


4 Answers

This has now been fixed in the latest commit.

The updated stable gem (3.1.17) hasn't been released yet but there are a few choices while you wait:

  1. Stick with 3.1.16 and use absolute paths when loading up watch, e.g:

    sass --watch /User/name/project/scss:/User/name/project/css
    

    The bug should only occur with relative paths so this works around it.

  2. Use the updated (alpha) version

    gem install sass --pre
    
  3. Temporarily roll back to 3.1.15 as suggested by @Marco Lazzeri

like image 65
pjumble Avatar answered Nov 16 '22 01:11

pjumble


Same problem here.

I don't know exactly what the problem is, but rolling back to the previous version is a temporary workaround:

gem uninstall sass -v=3.1.16
gem install sass -v=3.1.15
like image 30
Marco Lazzeri Avatar answered Nov 16 '22 01:11

Marco Lazzeri


As it is mentioned by pjumble, it is a known bug in process. You can use absolute path to address this problem, before a new version is release.

This is what I usually do to avoid typing a full path:

cd work-directory
sass --watch `pwd`/sass:`pwd`/css

Hope this work for you:)

like image 35
Carlosin Avatar answered Nov 16 '22 03:11

Carlosin


I too had the same problem. Just by updating my gem, it worked.

gem update sass
like image 26
Sonu Gupta Avatar answered Nov 16 '22 01:11

Sonu Gupta