导轨 3.0.9。
在 Gemfile 中:
gem 'compass-rails' (1.0.1)
gem 'sass' (3.0.19)
...
group :development, :test do
gem 'guard' (1.0.3)
gem 'guard-sass' (0.6.0)
...
end
在此配置中,错误是:
ERROR: Sass > Syntax error: File to import not found or unreadable: compass.
Load paths:
/var/www/inbox/public
/var/www/inbox/public/images
/var/www/inbox/public/images/intro
...
(通常我可以看到指南针的路径丢失(即...ruby-1.9.3-p194-perf/gems/compass-0.12.1/frameworks/compass/stylesheets
不存在),所以不知何故指南针没有被加载,我不知道该怎么做才能让它加载。
当我交易guard-sass
错误guard-compass
是:
ERROR: Rails.root is nil! (RuntimeError)
/home/jkl/.rvm/gems/ruby-1.9.3-p194-perf/gems/sass-3.1.19/lib/sass/util.rb:370:in `rails_root'
/home/jkl/.rvm/gems/ruby-1.9.3-p194-perf/gems/sass-3.1.19/lib/sass/plugin/rails.rb:11:in `default_options'
/home/jkl/.rvm/gems/ruby-1.9.3-p194-perf/gems/sass-3.1.19/lib/sass/plugin/configuration.rb:33:in `options'
/home/jkl/.rvm/gems/ruby-1.9.3-p194-perf/gems/sass-3.1.19/lib/sass/plugin/compiler.rb:38:in `initialize'
/home/jkl/.rvm/gems/ruby-1.9.3-p194-perf/gems/sass-3.1.19/lib/sass/plugin.rb:63:in `new'
/home/jkl/.rvm/gems/ruby-1.9.3-p194-perf/gems/sass-3.1.19/lib/sass/plugin.rb:63:in `compiler'
/home/jkl/.rvm/gems/ruby-1.9.3-p194-perf/gems/sass-3.1.19/lib/sass/plugin.rb:120:in `options'
...
guard-livereload
每当我更新.sass
文件时,我都希望它能够正常工作。
请注意,通常指南针可以正常工作。在页面刷新时,将从 SASS 文件生成新的 CSS。