Compass / compass

Compass is no longer actively maintained. Compass is a Stylesheet Authoring Environment that makes your website design simpler to implement and easier to maintain.
http://compass-style.org
Other
6.72k stars 1.18k forks source link

Change block raise an execption: undefined method 'to_tree' #1851

Open philgruneich opened 10 years ago

philgruneich commented 10 years ago

Sass 3.4.5 (Selective Steve) Compass 1.1.0.alpha.3 (Polaris) ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]

Could be similar to https://github.com/Compass/compass/issues/1641

[Listen warning]: Change block raise an execption: undefined method `to_tree' for nil:NilClass
Backtrace:
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/lib/sass/plugin/staleness_checker.rb:184:in `tree'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/lib/sass/plugin/staleness_checker.rb:174:in `compute_dependencies'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/lib/sass/plugin/staleness_checker.rb:149:in `dependencies'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/lib/sass/plugin/staleness_checker.rb:125:in `dependencies_stale?'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/lib/sass/plugin/staleness_checker.rb:166:in `block in dependency_updated?'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/lib/sass/plugin/staleness_checker.rb:125:in `each'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/lib/sass/plugin/staleness_checker.rb:125:in `any?'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/lib/sass/plugin/staleness_checker.rb:125:in `dependencies_stale?'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/lib/sass/plugin/staleness_checker.rb:166:in `block in dependency_updated?'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/lib/sass/plugin/staleness_checker.rb:81:in `call'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/lib/sass/plugin/staleness_checker.rb:81:in `stylesheet_modified_since?'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/lib/sass/plugin/staleness_checker.rb:69:in `stylesheet_needs_update?'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/lib/sass/plugin/compiler.rb:211:in `block in update_stylesheets'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/lib/sass/plugin/compiler.rb:209:in `each'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/lib/sass/plugin/compiler.rb:209:in `update_stylesheets'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/lib/sass/plugin/compiler.rb:469:in `on_file_changed'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/lib/sass/plugin/compiler.rb:328:in `block in watch'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/vendor/listen/lib/listen/listener.rb:252:in `call'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/vendor/listen/lib/listen/listener.rb:252:in `on_change'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/vendor/listen/lib/listen/listener.rb:290:in `block in initialize_adapter'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/vendor/listen/lib/listen/adapters/polling.rb:48:in `call'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/vendor/listen/lib/listen/adapters/polling.rb:48:in `poll_changed_directories'
    /Library/Ruby/Gems/2.0.0/gems/sass-3.4.5/vendor/listen/lib/listen/adapter.rb:299:in `block in start_poller'
luke-rooster commented 10 years ago

I'm also getting this same issue.

Not sure if it is anything to do with this but I am using global variables via the import feature (one main file pulling in all SCSS files /w variables declared at top, used throughout) sometimes it will flag that x.scss cannot find $v.

Issue is fixed if I cancel the current watch command and re-run it

seminice commented 9 years ago

Any news with this issue? I'm getting the same too.

earl3s commented 9 years ago

I'm also getting this error on version 1.0.1. Any ideas on it?

byCedric commented 9 years ago

Still an issue on 1.0.3...

benjarwar commented 9 years ago

Also reporting the issue on 1.0.3.

KristobalJunta commented 9 years ago

Same trouble, v1.0.3 too

sherizan commented 9 years ago

same here Compass 1.0.3 (Polaris)

tomasdev commented 9 years ago

:+1:

A fix is terminating your compass watch and starting it back again.

joedaniels commented 9 years ago

@tomasdev Not much of a fix since you have to be constantly terminating and starting compass over and over again.

seminice commented 9 years ago

I agree wtih @joedaniels

benjarwar commented 9 years ago

I also agree with @joedaniels.

krstffr commented 9 years ago

I also agree with @joedaniels.

Jones-S commented 9 years ago

same here. 1.0.3

honucreative commented 9 years ago

Getting the same problem.

duckumu commented 9 years ago

I've also been having this issue for months. I stop Compass and run the watch command again to get everything working but... yeah.

ETA: Thought it worth mentioning that the only Compass frameworks I have installed are: compass sassy-maps breakpoint

Antoinebr commented 9 years ago

Same here :/

mcclaskiem commented 9 years ago

Getting this error as well.

Using: Bourbon Bourbon-Neat Custom Silent Classes and mixins/vars

Any word on a fix?

voidstate commented 9 years ago

Also having this issue.

rebdev commented 9 years ago

Same...

ktoh commented 9 years ago

Ditto...

petemolinero commented 9 years ago

Same issue for me.

ccpotter commented 9 years ago

Same issue here. I have multiple projects running compass watch, some local, some on network drives and this seems to only occur when watching files on a network drive. Fixed by resaving the sass file but frustrating none the less. Another thing that I have done is changed where the cache is stored by modifying the config.rb for my network projects. cache_path = 'C:/temp/PROJECTNAME/.sass-cache'

dynamicdan commented 9 years ago

No joy? Fixes?

jonlambert commented 9 years ago

Same here.

jstoller commented 9 years ago

I've been having this problem for a while now and thought it was me. :-/

I'm using the following gems:

webilhan commented 9 years ago

Same error for me

azclub commented 9 years ago

Same error ....

tsi commented 9 years ago

Same here too...

artursopelnik commented 9 years ago

Same error here …

Haikson commented 9 years ago

Same error too...

gcasalett commented 9 years ago

Just keeping this alive. This issue started out of the blue a couple of weeks ago. Only significant software change I can think of is I upgraded to Adobe Suite CC 2015.

Ruby v. 2.2.2p95 Sass v. 4.3.13 Compass v. 1.0.3

japascal commented 9 years ago

same here

SedueRey commented 9 years ago

lol but ... same here :)

seminice commented 9 years ago

solved by not using compass.

jstoller commented 9 years ago

It seems to be Compass watch that's causing the problem here. I started using Gulp to watch my files and trigger a compass compile and that works fine.

striky1 commented 9 years ago

same here

compass (1.0.3) sass (3.4.13)

lutoma commented 9 years ago

Getting this too from time to time after saving a file.

x1unix commented 9 years ago

I aslo have this problem. I think that this is a Compass bug.

ItIsInspiring commented 9 years ago

i have the same problem. My "solution" is to make compass restart again with "ctrl"+"c" and "o". When it restarts, it works again.

Kwaadpepper commented 9 years ago

Also have this bug, you may do : while :; do compass compile; sleep 2; done

fabiofidanza commented 9 years ago

Happening randomly here too "compass","1.0.1" "sass","3.4.18"

Only fix is to kill and restart the watcher process.

JamesVanWaza commented 9 years ago

Using compass and compass-import-once is not recommended to use them at the same time, Only use Compass.

petulla commented 9 years ago

Same here..

ymondirNm commented 9 years ago

if you have imports, you can save another file(add and remove a space) and it works, it's not a fix but still better than restart the watcher

JamesVanWaza commented 9 years ago

@fabiofidanza Are you still seeing the problem, if so, please post your gruntfile so I can see what's wrong as well as a list of node_modules you are using.

fabiofidanza commented 9 years ago

@jgacuca567 I'm using a plain old compass watch, launched via nohup:

nohup bundle exec compass watch >compass.log &

here are the Gems that are used in one of the projects where I experience the problem:

chunky_png (1.3.4)
compass (1.0.1)
  chunky_png (~> 1.2)
  compass-core (~> 1.0.1)
  compass-import-once (~> 1.0.5)
  rb-fsevent (>= 0.9.3)
  rb-inotify (>= 0.9)
  sass (>= 3.3.13, < 3.5)
compass-core (1.0.3)
  multi_json (~> 1.0)
  sass (>= 3.3.0, < 3.5)
compass-import-once (1.0.5)
  sass (>= 3.2, < 3.5)
ffi (1.9.10)
multi_json (1.11.2)
rb-fsevent (0.9.5)
rb-inotify (0.9.5)
  ffi (>= 0.5.0)
sass (3.4.15)

Thanks

JamesVanWaza commented 9 years ago

@fabiofidanza I guess, for me I have been using NPM Modules, see My gist file, see how I have setup file. As of now when I run sudo grunt, no errors from compass are found.

https://gist.github.com/jgacuca567/143754cd4590df7f00fd

imme-emosol commented 9 years ago

My guess would be that there's something wrong on line 80 in /var/lib/gems/2.1.0/gems/sass-3.4.19/lib/sass/plugin/staleness_checker.rb On that line the importer should be set to the given option filesystem_importer if it's nil . The importer however seems to end up as nil at /var/lib/gems/2.1.0/gems/sass-3.4.19/vendor/listen/lib/listen/adapter.rb :299 .

The other possibility is that somehow importer gets reset to nil. Which seems to be able to be because of the thread as mentioned in https://github.com/guard/listen/issues/219 . On a short test this Thread-timing-issues seems to fix the issue for me. I changed the DEFAULT_LATENCY on line 22 from 0.25 to 2 in the file : /var/lib/gems/2.1.0/gems/sass-3.4.19/vendor/listen/lib/listen/adapter.rb .

otygblodhemn commented 8 years ago

Same issue since today. Not viewed before.

autoprefixer-rails (6.0.3) bigdecimal (1.2.6) bootstrap-sass (3.3.5.1) chunky_png (1.3.4) compass (1.0.3) compass-core (1.0.3) compass-import-once (1.0.5) execjs (2.6.0) ffi (1.9.10 x86-minggw32) io-console (0.4.3) json (1.8.1) minitest (5.4.3) multi_json (1.11.2) power_assert (0.2.2) psych (2.0.8) rake (10.4.2) rb-fsevent (0.9.6) rb-inotify (0.9.5) rdoc (4.2.0) sass (3.4.19) test-unit (3.0.8)

bnomei commented 8 years ago

same... compass (1.0.3), compass-core (1.0.3), compass-import-once (1.0.5), susy (2.2.6)