Skip to content

New files get ignored #107

alanhogan opened this Issue Jun 5, 2012 · 8 comments

7 participants



  • Rails 3.2 project.

  • My stylesheet includes this line:

    @import "core/pages/*"
  • Adding a new file core/pages/x.sass has no effect.

  • Adding this line to my stylesheet causes x to be noticed:

    @import "core/pages/x"
  • x will continue to be paid attention to after this, even if the line in the previous step is removed.

Neither rake tmp:clear nor rake assets:clean seem to have no effect on the above.

Neither does modifying the main stylesheet in a trivial way (like adding whitespace or touch-ing).

Is there any way I can tell sass-rails, doing its asset-pipeline magic, to force update?

See also: Compass/compass#818 and Compass/compass-rails#46


Is this a sprockets bug? Filed: sstephenson/sprockets#336

@alanhogan alanhogan referenced this issue in sstephenson/sprockets Aug 14, 2012

New files get ignored #336

swrobel commented Apr 9, 2013

Still seeing this on sass-rails 3.2.6 with sprockets 2.2.2.backport1

Anyone have a workaround?

swrobel commented May 13, 2013

anyone? bueller?

alexcp commented Jun 5, 2013

I'm having the same issue.


This is because the importer doesn't implement the mtime method. It needs to check if the uri is a glob and if it is, it should return the mtime of the most recent file changed otherwise it should delegate to the superclass.

Here's how I do this in the sass-globbing plugin:

anyone care to make a patch?


I'm still seeing this behavior. If I get a chance I'll look into doing a pull request, but for now here's a workaround for anyone else that needs a quick fix. (never mind, didn't work).

jeroenj commented Jan 9, 2014

The workaround I'm using when adding new files is changing the file that has the import. Adding a newline is enough to let it compile again. Simply touching it does not work, you really have to change it.

travisp commented Feb 25, 2014

Just ran into this bug in Rails 4 and #184 seems to fix it. Is there any reason we can't merge it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.