我正在尝试运行sass命令
sass /usr/bin/ruby /usr/local/bin/sass --load-path /opt/lampp/htdocs/kunstmann/vendor/kunstmaan/admin-bundle/Kunstmaan/AdminBundle/Resources/public/scss
我收到了这个错误。
/usr/bin/ruby:1: Invalid UTF-8 character "\xA0" (Sass::SyntaxError)
from /var/lib/gems/1.9.1/gems/sass-3.2.13/lib/sass/engine.rb:373:in `block in check_encoding!'
from /var/lib/gems/1.9.1/gems/sass-3.2.13/lib/sass/util.rb:604:in `rescue in block in check_encoding'
from /var/lib/gems/1.9.1/gems/sass-3.2.13/lib/sass/util.rb:601:in `block in check_encoding'
from /var/lib/gems/1.9.1/gems/sass-3.2.13/lib/sass/util.rb:600:in `each'
from /var/lib/gems/1.9.1/gems/sass-3.2.13/lib/sass/util.rb:600:in `each_with_index'
from /var/lib/gems/1.9.1/gems/sass-3.2.13/lib/sass/util.rb:600:in `check_encoding'
from /var/lib/gems/1.9.1/gems/sass-3.2.13/lib/sass/util.rb:654:in `check_sass_encoding'
from /var/lib/gems/1.9.1/gems/sass-3.2.13/lib/sass/engine.rb:372:in `check_encoding!'
from /var/lib/gems/1.9.1/gems/sass-3.2.13/lib/sass/engine.rb:339:in `_to_tree'
from /var/lib/gems/1.9.1/gems/sass-3.2.13/lib/sass/engine.rb:315:in `_render'
from /var/lib/gems/1.9.1/gems/sass-3.2.13/lib/sass/engine.rb:262:in `render'
from /var/lib/gems/1.9.1/gems/sass-3.2.13/lib/sass/exec.rb:349:in `process_result'
from /var/lib/gems/1.9.1/gems/sass-3.2.13/lib/sass/exec.rb:41:in `parse'
from /var/lib/gems/1.9.1/gems/sass-3.2.13/lib/sass/exec.rb:21:in `parse!'
from /var/lib/gems/1.9.1/gems/sass-3.2.13/bin/sass:13:in `<top (required)>'
from /usr/local/bin/sass:23:in `load'
from /usr/local/bin/sass:23:in `<main>'
我试过推杆 @charset“utf-8”; 到sass文件的开头。 还尝试将Encoding.default_external =“utf-8”包含到众多config.rb文件中。 红宝石版红宝石1.9.3p484
更新:
我正在编译css文件但是里面有这个错误。 使用Symfony2命令进行编译:app / console assetic:dump
[exception] 500 | Internal Server Error | Assetic\Exception\FilterException
[message] An error occurred while running:
'/usr/bin/ruby' '/usr/local/bin/sass' '--load-path' '/opt/lampp/htdocs/kunstmann/vendor/kunstmaan/admin-bundle/Kunstmaan/AdminBundle /Resources/public/scss' '--scss' '--cache-location' '/tmp' '/tmp/assetic_sasspqLusY'
Error Output:
Errno::ENOENT: No such file or directory - /tmp/600d657f6ac2358f30ba6bc0ab4cd7ffb6194ced/assetic_sasspqLusYc20141111-4656-uxy3yg.lock
使用--trace进行回溯。
答案 0 :(得分:0)
你将ruby程序/ usr / bin / ruby作为参数传递给sass。所以sass试图读取ruby程序,这是一个二进制文件,这就是你得到错误的原因。
从命令开头删除sass。