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.73k stars 1.18k forks source link

when compass watching project add new sass file will make it crash #1168

Open tka opened 11 years ago

tka commented 11 years ago

when compass watching project add new sass file will make it crash

x220t[~]$ compass version                                                                       
Compass 0.13.alpha.2 (Markab)
Copyright (c) 2008-2013 Chris Eppstein
Released under the MIT License.
Compass is charityware.
Please make a tax deductable donation for a worthy cause: http://umdf.org/compass
x220t[~]$  compass create test 
...... a lot info .....
x220t[~/test]$ cd test                                                                                                   
x220t[~/test]$ compass watch &                                                                 
[1] 21862
>>> Compass is watching for changes. Press Ctrl-C to Stop.                                                  
[Listen warning]:
  Missing dependency 'rb-inotify' (version '~> 0.8.8')!
  Please run the following to satisfy the dependency:
    gem install --version '~> 0.8.8' rb-inotify

  For a better performance, it's recommended that you satisfy the missing dependency.
  Compass is polling for changes
x220t[~/test]$ touch sass/test.scss                                                                                                                                 
x220t[~/test]$      info sass/test.scss was added                                                                                                                   
TypeError on line ["63"] of /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/sass-3.2.4/lib/sass/plugin/staleness_checker.rb: can't convert nil into String
Run with --trace to see the full backtrace

[1]  + 21862 exit 1     compass watch
scottdavis commented 11 years ago
TypeError on line ["63"] of /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/sass-3.2.4/lib/sass/plugin/staleness_checker.rb: can't convert nil into String

Seems like railsexpress has an issue this doesn't look like a compass problem.

scottdavis commented 11 years ago

Actually i may take that back can you run it with --trace and supply the output

tka commented 11 years ago

@scottdavis here is trace log

may be https://github.com/chriseppstein/compass/blob/master/lib/compass/compiler.rb#L53 should not use ||= ?

x220t[~/test]$ compass watch --trace
x220t[~/test]$ >>> Compass is watching for changes. Press Ctrl-C to Stop.                                                                                           rvm:ruby-1.9.3-p374 
[Listen warning]:
  Missing dependency 'rb-inotify' (version '~> 0.8.8')!
  Please run the following to satisfy the dependency:
    gem install --version '~> 0.8.8' rb-inotify

  For a better performance, it's recommended that you satisfy the missing dependency.
  Compass is polling for changes

x220t[~/test]$ touch sass/test2.scss                                                                                               
zsh: correct 'sass/test2.scss' to 'sass/test.scss' [nyae]? n
x220t[~/test]$      info sass/test2.scss was added                                                  
overwrite stylesheets/print.css 
TypeError on line ["63"] of /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/sass-3.2.4/lib/sass/plugin/staleness_checker.rb: can't convert nil into String
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/sass-3.2.4/lib/sass/plugin/staleness_checker.rb:63:in `stylesheet_needs_update?'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/compass-0.13.alpha.2/lib/compass/compiler.rb:73:in `needs_update?'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/compass-0.13.alpha.2/lib/compass/compiler.rb:155:in `should_compile?'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/compass-0.13.alpha.2/lib/compass/compiler.rb:123:in `compile_if_required'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/compass-0.13.alpha.2/lib/compass/compiler.rb:109:in `block (2 levels) in run'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/compass-0.13.alpha.2/lib/compass/compiler.rb:107:in `each'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/compass-0.13.alpha.2/lib/compass/compiler.rb:107:in `block in run'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/compass-0.13.alpha.2/lib/compass/compiler.rb:132:in `timed'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/compass-0.13.alpha.2/lib/compass/compiler.rb:106:in `run'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/compass-0.13.alpha.2/lib/compass/watcher/compiler.rb:24:in `compile'
  /home/tka/.rvm/rubies/ruby-1.9.3-p374-railsexpress/lib/ruby/1.9.1/forwardable.rb:201:in `compile'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/compass-0.13.alpha.2/lib/compass/watcher/project_watcher.rb:94:in `sass_added'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/compass-0.13.alpha.2/lib/compass/watcher/project_watcher.rb:83:in `sass_callback'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/compass-0.13.alpha.2/lib/compass/watcher/watch.rb:17:in `call'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/compass-0.13.alpha.2/lib/compass/watcher/watch.rb:17:in `run_callback'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/compass-0.13.alpha.2/lib/compass/watcher/project_watcher.rb:75:in `block (2 levels) in listen_callback'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/compass-0.13.alpha.2/lib/compass/watcher/project_watcher.rb:74:in `each'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/compass-0.13.alpha.2/lib/compass/watcher/project_watcher.rb:74:in `block in listen_callback'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/compass-0.13.alpha.2/lib/compass/watcher/project_watcher.rb:73:in `each'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/compass-0.13.alpha.2/lib/compass/watcher/project_watcher.rb:73:in `listen_callback'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/listen-0.5.3/lib/listen/listener.rb:190:in `call'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/listen-0.5.3/lib/listen/listener.rb:190:in `on_change'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/listen-0.5.3/lib/listen/listener.rb:199:in `block in initialize_adapter'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/listen-0.5.3/lib/listen/adapters/polling.rb:56:in `call'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/listen-0.5.3/lib/listen/adapters/polling.rb:56:in `poll'
  /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/listen-0.5.3/lib/listen/adapters/polling.rb:32:in `block in start'

and ruby 1.9.3-p385 without railspress patch

x220t[~]$ rvm info                                         rvm:ruby-1.9.3-p385 

ruby-1.9.3-p385:

  system:
    uname:       "Linux x220t 3.8.0-1-mainline #1 SMP PREEMPT Sat Feb 2 15:13:58 CET 2013 x86_64 GNU/Linux"
    system:      "arch/libc-2.17/x86_64"
    bash:        "/usr/bin/bash => GNU bash, version 4.2.42(2)-release (x86_64-unknown-linux-gnu)"
    zsh:         "/bin/zsh => zsh 5.0.2 (x86_64-unknown-linux-gnu)"

  rvm:
    version:      "rvm 1.18.6 (master) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
    updated:      "8 minutes 47 seconds ago"

  ruby:
    interpreter:  "ruby"
    version:      "1.9.3p385"
    date:         "2013-02-06"
    platform:     "x86_64-linux"
    patchlevel:   "2013-02-06 revision 39114"
    full_version: "ruby 1.9.3p385 (2013-02-06 revision 39114) [x86_64-linux]"

  homes:
    gem:          "/home/tka/.rvm/gems/ruby-1.9.3-p385"
    ruby:         "/home/tka/.rvm/rubies/ruby-1.9.3-p385"

  binaries:
    ruby:         "/home/tka/.rvm/rubies/ruby-1.9.3-p385/bin/ruby"
    irb:          "/home/tka/.rvm/rubies/ruby-1.9.3-p385/bin/irb"
    gem:          "/home/tka/.rvm/rubies/ruby-1.9.3-p385/bin/gem"
    rake:         "/home/tka/.rvm/gems/ruby-1.9.3-p385@global/bin/rake"

  environment:
    PATH:         "/home/tka/.rvm/gems/ruby-1.9.3-p385/bin:/home/tka/.rvm/gems/ruby-1.9.3-p385@global/bin:/home/tka/.rvm/rubies/ruby-1.9.3-p385/bin:/home/tka/.rvm/bin:/usr/share/java/apache-ant/bin:/home/tka/Project/android/android-sdk-linux_x86/platform-tools:/opt/java/bin/:/home/tka/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/java6/bin:/opt/java6/db/bin:/opt/java6/jre/bin:/usr/bin/vendor_perl:/usr/bin/core_perl"
    GEM_HOME:     "/home/tka/.rvm/gems/ruby-1.9.3-p385"
    GEM_PATH:     "/home/tka/.rvm/gems/ruby-1.9.3-p385:/home/tka/.rvm/gems/ruby-1.9.3-p385@global"
    MY_RUBY_HOME: "/home/tka/.rvm/rubies/ruby-1.9.3-p385"
    IRBRC:        "/home/tka/.rvm/rubies/ruby-1.9.3-p385/.irbrc"
    RUBYOPT:      ""
    gemset:       ""

x220t[~]$ compass create test2                             rvm:ruby-1.9.3-p385 
zsh: correct 'test2' to 'test' [nyae]? n
directory test2/ 
directory test2/sass/ 
directory test2/stylesheets/ 
   create test2/config.rb 
   create test2/sass/screen.scss 
   create test2/sass/print.scss 
   create test2/sass/ie.scss 
   create test2/stylesheets/ie.css 
   create test2/stylesheets/screen.css 
   create test2/stylesheets/print.css 

*********************************************************************
Congratulations! Your compass project has been created.

You may now add and edit sass stylesheets in the sass subdirectory of your project.

Sass files beginning with an underscore are called partials and won't be
compiled to CSS, but they can be imported into other sass stylesheets.

You can configure your project by editing the config.rb configuration file.

You must compile your sass stylesheets into CSS when they change.
This can be done in one of the following ways:
  1. To compile on demand:
     compass compile [path/to/project]
  2. To monitor your project for changes and automatically recompile:
     compass watch [path/to/project]

More Resources:
  * Website: http://compass-style.org/
  * Sass: http://sass-lang.com
  * Community: http://groups.google.com/group/compass-users/

To import your new stylesheets add the following lines of HTML (or equivalent) to your webpage:
<head>
  <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" />
  <link href="/stylesheets/print.css" media="print" rel="stylesheet" type="text/css" />
  <!--[if IE]>
      <link href="/stylesheets/ie.css" media="screen, projection" rel="stylesheet" type="text/css" />
  <![endif]-->
</head>
x220t[~]$ compass watch test2 --trace &                    rvm:ruby-1.9.3-p385 
[2] 20719
x220t[~]$ >>> Compass is watching for changes. Press Ctrl-C to Stop.1.9.3-p385 
[Listen warning]:
  Missing dependency 'rb-inotify' (version '~> 0.8.8')!
  Please run the following to satisfy the dependency:
    gem install --version '~> 0.8.8' rb-inotify

  For a better performance, it's recommended that you satisfy the missing dependency.
  Compass is polling for changes

x220t[~]$ touch test2/sass/test.scss                       rvm:ruby-1.9.3-p385 
x220t[~]$      info sass/test.scss was added               rvm:ruby-1.9.3-p385 
TypeError on line ["63"] of /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/sass-3.2.0.alpha.294/lib/sass/plugin/staleness_checker.rb: can't convert nil into String
  /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/sass-3.2.0.alpha.294/lib/sass/plugin/staleness_checker.rb:63:in `stylesheet_needs_update?'
  /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/compass-0.13.alpha.2/lib/compass/compiler.rb:73:in `needs_update?'
  /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/compass-0.13.alpha.2/lib/compass/compiler.rb:67:in `block in out_of_date?'
  /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/compass-0.13.alpha.2/lib/compass/compiler.rb:66:in `each'
  /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/compass-0.13.alpha.2/lib/compass/compiler.rb:66:in `out_of_date?'
  /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/compass-0.13.alpha.2/lib/compass/watcher/compiler.rb:20:in `compile'
  /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/compass-0.13.alpha.2/lib/compass/watcher/project_watcher.rb:94:in `sass_added'
  /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/compass-0.13.alpha.2/lib/compass/watcher/project_watcher.rb:83:in `sass_callback'
  /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/compass-0.13.alpha.2/lib/compass/watcher/watch.rb:17:in `call'
  /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/compass-0.13.alpha.2/lib/compass/watcher/watch.rb:17:in `run_callback'
  /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/compass-0.13.alpha.2/lib/compass/watcher/project_watcher.rb:75:in `block (2 levels) in listen_callback'
  /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/compass-0.13.alpha.2/lib/compass/watcher/project_watcher.rb:74:in `each'
  /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/compass-0.13.alpha.2/lib/compass/watcher/project_watcher.rb:74:in `block in listen_callback'
  /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/compass-0.13.alpha.2/lib/compass/watcher/project_watcher.rb:73:in `each'
  /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/compass-0.13.alpha.2/lib/compass/watcher/project_watcher.rb:73:in `listen_callback'
  /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/listen-0.5.3/lib/listen/listener.rb:190:in `call'
  /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/listen-0.5.3/lib/listen/listener.rb:190:in `on_change'
  /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/listen-0.5.3/lib/listen/listener.rb:199:in `block in initialize_adapter'
  /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/listen-0.5.3/lib/listen/adapters/polling.rb:56:in `call'
  /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/listen-0.5.3/lib/listen/adapters/polling.rb:56:in `poll'
  /home/tka/.rvm/gems/ruby-1.9.3-p385/gems/listen-0.5.3/lib/listen/adapters/polling.rb:32:in `block in start'

[2]  + 20719 exit 1     compass watch test2 --trace
scottdavis commented 11 years ago

Ubuntu?

tka commented 11 years ago

@scottdavis ArchLinux https://www.archlinux.org/

scottdavis commented 11 years ago

Fancy

Sent from my iPhone

On Feb 12, 2013, at 10:46 PM, tka notifications@github.com wrote:

@scottdavis ArchLinux https://www.archlinux.org/

— Reply to this email directly or view it on GitHub.

scottdavis commented 11 years ago

Im not seeing an issue on ubuntu

tka commented 11 years ago

@scottdavis

x220t[~]$ compass watch test2 &                                                                                                     
[1] 582
x220t[~]$ >>> Compass is watching for changes. Press Ctrl-C to Stop.                                                                  
[Listen warning]:
  Missing dependency 'rb-inotify' (version '~> 0.8.8')!
  Please run the following to satisfy the dependency:
    gem install --version '~> 0.8.8' rb-inotify

  For a better performance, it's recommended that you satisfy the missing dependency.
  Compass is polling for changes

x220t[~]$ touch test2/sass/_foo.scss                                                                                  
x220t[~]$      info sass/_foo.scss was added                                                                                      
x220t[~]$ touch test2/sass/bar.scss                                                                                    
x220t[~]$      info sass/bar.scss was added                                                                                  
overwrite stylesheets/print.css 
TypeError on line ["63"] of /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/sass-3.2.4/lib/sass/plugin/staleness_checker.rb: can't convert nil into String
Run with --trace to see the full backtrace

could you add a sass not beginning with underscore?

in https://github.com/chriseppstein/compass/blob/master/lib/compass/compiler.rb#L66

will call https://github.com/chriseppstein/compass/blob/master/lib/compass/compiler.rb#L52

to get sass and css filename mapping, but when add a new sass file foo.scss

but in https://github.com/chriseppstein/compass/blob/master/lib/compass/compiler.rb#L53

@css_files ||= sass_files.map{|sass_file| corresponding_css_file(sass_file)} the ||= make css files no update

so we will get a array like [["bar.scss", "css/bar.css"], ["foo.scss", nil]] in line 66

then in https://github.com/chriseppstein/compass/blob/master/lib/compass/compiler.rb#L67

will call needs_update?(css_filename, sass_filename)

when css filename is nil, https://github.com/nex3/sass/blob/stable/lib/sass/plugin/staleness_checker.rb#L63 raise the expectation

scottdavis commented 11 years ago

Oh ... Hmm ok I think I know what's going on

Sent from my iPhone

On Feb 14, 2013, at 11:05 PM, tka notifications@github.com wrote:

@scottdavis

x220t[~]$ compass watch test2 &
[1] 582 x220t[~]$ >>> Compass is watching for changes. Press Ctrl-C to Stop.
[Listen warning]: Missing dependency 'rb-inotify' (version '~> 0.8.8')! Please run the following to satisfy the dependency: gem install --version '~> 0.8.8' rb-inotify

For a better performance, it's recommended that you satisfy the missing dependency. Compass is polling for changes

x220t[~]$ touch test2/sass/_foo.scss
x220t[~]$ info sass/_foo.scss was added
x220t[~]$ touch test2/sass/bar.scss
x220t[~]$ info sass/bar.scss was added
overwrite stylesheets/print.css TypeError on line ["63"] of /home/tka/.rvm/gems/ruby-1.9.3-p374-railsexpress/gems/sass-3.2.4/lib/sass/plugin/staleness_checker.rb: can't convert nil into String Run with --trace to see the full backtrace could you add a sass not beginning with underscore?

in https://github.com/chriseppstein/compass/blob/master/lib/compass/compiler.rb#L66

will call https://github.com/chriseppstein/compass/blob/master/lib/compass/compiler.rb#L52

to get sass and css filename mapping, but when add a new sass file foo.scss

but in https://github.com/chriseppstein/compass/blob/master/lib/compass/compiler.rb#L53

@css_files ||= sass_files.map{|sass_file| corresponding_css_file(sass_file)} the ||= make css files no update

so we will get a array like [["bar.scss", "css/bar.css"], ["foo.scss", nil]] in line 66

then in https://github.com/chriseppstein/compass/blob/master/lib/compass/compiler.rb#L67

will call needs_update?(css_filename, sass_filename)

when css filename is nil, https://github.com/nex3/sass/blob/stable/lib/sass/plugin/staleness_checker.rb#L63 raise the expectation

— Reply to this email directly or view it on GitHub.

deepak commented 11 years ago

same issue with ruby2 and compass-0.13.alpha.4

TypeError on line ["63"] of /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/sass-3.2.7/lib/sass/plugin/staleness_checker.rb: no implicit conversion of nil into String
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/sass-3.2.7/lib/sass/plugin/staleness_checker.rb:63:in `stylesheet_needs_update?'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/compass-0.13.alpha.4/lib/compass/compiler.rb:73:in `needs_update?'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/compass-0.13.alpha.4/lib/compass/compiler.rb:155:in `should_compile?'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/compass-0.13.alpha.4/lib/compass/compiler.rb:123:in `compile_if_required'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/compass-0.13.alpha.4/lib/compass/compiler.rb:109:in `block (2 levels) in run'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/compass-0.13.alpha.4/lib/compass/compiler.rb:107:in `each'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/compass-0.13.alpha.4/lib/compass/compiler.rb:107:in `block in run'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/compass-0.13.alpha.4/lib/compass/compiler.rb:132:in `timed'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/compass-0.13.alpha.4/lib/compass/compiler.rb:106:in `run'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/compass-0.13.alpha.4/lib/compass/watcher/compiler.rb:24:in `compile'
23:15:45 css.1  |   /Users/deepak/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/forwardable.rb:171:in `compile'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/compass-0.13.alpha.4/lib/compass/watcher/project_watcher.rb:97:in `sass_added'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/compass-0.13.alpha.4/lib/compass/watcher/project_watcher.rb:86:in `sass_callback'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/compass-0.13.alpha.4/lib/compass/watcher/watch.rb:17:in `call'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/compass-0.13.alpha.4/lib/compass/watcher/watch.rb:17:in `run_callback'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/compass-0.13.alpha.4/lib/compass/watcher/project_watcher.rb:78:in `block (2 levels) in listen_callback'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/compass-0.13.alpha.4/lib/compass/watcher/project_watcher.rb:77:in `each'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/compass-0.13.alpha.4/lib/compass/watcher/project_watcher.rb:77:in `block in listen_callback'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/compass-0.13.alpha.4/lib/compass/watcher/project_watcher.rb:76:in `each'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/compass-0.13.alpha.4/lib/compass/watcher/project_watcher.rb:76:in `listen_callback'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/listen-0.7.3/lib/listen/listener.rb:212:in `call'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/listen-0.7.3/lib/listen/listener.rb:212:in `on_change'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/listen-0.7.3/lib/listen/listener.rb:221:in `block in initialize_adapter'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/listen-0.7.3/lib/listen/adapter.rb:198:in `call'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/listen-0.7.3/lib/listen/adapter.rb:198:in `report_changes'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/listen-0.7.3/lib/listen/adapter.rb:210:in `poll_changed_dirs'
23:15:45 css.1  |   /Users/deepak/.rvm/gems/ruby-2.0.0-p0@foobar/gems/listen-0.7.3/lib/listen/adapters/darwin.rb:38:in `block in start'
deepak commented 11 years ago

solved it manually for now, by having the following config

Guardfile

# for its logger. so that the output is consistent with "compass compile"
require 'compass'

guard :shell do
  watch(%r{^assets/(.+)\.s[ac]ss$}) do |file|
    if File.exists? file[0]
      `bin/compass compile --trace assets`
    else
      removed_file = "assets/stylesheets/#{file[1].split('/').last}.css"
      `rm -f #{removed_file}`
      # ::Guard::UI.info "deleted scss file #{removed_file}"
      logger = ::Compass::Logger.new
      logger.record :remove, removed_file
    end
  end
end

Procfile

web: bin/shotgun app.rb
guard: bin/compass compile --trace assets && bin/guard start
scottdavis commented 11 years ago

@deepak post your compass config, please.

deepak commented 11 years ago

@scottdavis i had created a compass project with compass create assets -r bootstrap-sass --using bootstrap for a sinatra project

My compass/config.rb so generated is:

require 'bootstrap-sass'
# Require any additional compass plugins here.

# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "stylesheets"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts"

# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed

# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true

# To disable debugging comments that display the original location of your selectors. Uncomment:
# line_comments = false

# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
hlb commented 10 years ago

@chriseppstein,

Steps to reproduce this bug:

compass create test
cd test
compass watch &
sleep 5
touch sass/foo.scss
touch sass/bar.scss

Tested in ruby 2.0, Sass 3.3.0.rc.1, Compass 0.13.alpha.8

The problem is because of the implementation of cache: https://github.com/chriseppstein/compass/blob/master/lib/compass/compiler.rb#L53