新手问题 scss 编译错误

sanvi · 2012年11月02日 · 最后由 sanivbyfish 回复于 2012年11月05日 · 3424 次阅读
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
Invalid CSS after "...4882640c.png"")": expected "{", was ";background-pos..."
  (in /Users/SanviLu/Documents/workspace/ruby_on_rails/code4/app/assets/stylesheets/application.css)
(sass):932
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.1/lib/sass/scss/parser.rb:1130:in `expected'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.1/lib/sass/scss/parser.rb:1066:in `expected'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.1/lib/sass/scss/parser.rb:1061:in `tok!'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.1/lib/sass/scss/parser.rb:517:in `block'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.1/lib/sass/scss/parser.rb:512:in `ruleset'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.1/lib/sass/scss/parser.rb:574:in `block in declaration_or_ruleset'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.1/lib/sass/scss/parser.rb:1104:in `call'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.1/lib/sass/scss/parser.rb:1104:in `rethrow'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.1/lib/sass/scss/parser.rb:575:in `declaration_or_ruleset'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.1/lib/sass/scss/parser.rb:537:in `block_child'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.1/lib/sass/scss/parser.rb:529:in `block_contents'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.1/lib/sass/scss/parser.rb:518:in `block'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.1/lib/sass/scss/parser.rb:512:in `ruleset'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.1/lib/sass/scss/parser.rb:536:in `block_child'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.1/lib/sass/scss/parser.rb:529:in `block_contents'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.1/lib/sass/scss/parser.rb:70:in `stylesheet'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.1/lib/sass/scss/parser.rb:27:in `parse'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.1/lib/sass/engine.rb:342:in `_to_tree'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.1/lib/sass/engine.rb:315:in `_render'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.1/lib/sass/engine.rb:262:in `render'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sass-rails-3.2.5/lib/sass/rails/compressor.rb:8:in `compress'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/sprockets/compressors.rb:74:in `compress'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/processing.rb:243:in `block in css_compressor='
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/processor.rb:29:in `call'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/processor.rb:29:in `evaluate'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/context.rb:177:in `block in evaluate'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/context.rb:174:in `each'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/context.rb:174:in `evaluate'
/Users/SanviLu/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/bundled_asset.rb:26:in `initialize'

这种错误我怎么查。。。擦。。。

Invalid CSS after "...4882640c.png"")": expected "{", was ";background-pos..." (in /Users/SanviLu/Documents/workspace/ruby_on_rails/code4/app/assets/stylesheets/application.css) (sass):932

多清楚。。

#1 楼 @suupic 好像是 bootstrap 的版本出问题。。

#2 楼 @sanivbyfish 语法不对啊,缺少{

CSS 有语法错误,检查 application.css

#4 楼 @huacnlee bootstrap2.1.5 的一个 bug,退回 2.1.3 就可以了

需要 登录 后方可回复, 如果你还没有账号请 注册新账号