Ruby / Compass Sass语法错误

时间:2016-08-17 02:30:17

标签: ruby compass-sass

Compass的第一次用户,在让我的sass编译器工作时遇到问题。我在网上看了一个教程,我收到了这个错误:

错误

syntaxError on line ["24"] of C: C:/Users/Casey/Sites/devdesktop/bootstrap-subtheme/themes/less_subtheme/config.rb:1: 
syntax error, unexpected tIDENTIFIER, expecting end-of-input
..."/themes/less_subtheme" css_dir = "css" sass_dir = "assets/s...

config.rb文件

ruby http_path = "/themes/less_subtheme" css_dir = "css" sass_dir = "assets/sass" images_dir = "assets/images" javascripts_dir = "js" fonts_dir = "bootstrap/fonts/bootstrap" generated_images_dir = "img" http_images_path = http_path + "/" + generated_images_dir http_generated_images_path = http_images_path output_style = (environment == :production) ? :compressed : :expanded

我已经重写了我复制的代码,以确保没有复制搞笑引号或空格,我仍然会遇到同样的错误。

1 个答案:

答案 0 :(得分:1)

这是因为你的所有代码都在一行上,并且有#34; ruby​​"出现在开头。试试这个

http_path = "/themes/less_subtheme"
css_dir = "css"
sass_dir = "assets/sass"
images_dir = "assets/images"
javascripts_dir = "js"
fonts_dir = "bootstrap/fonts/bootstrap"
generated_images_dir = "img"
http_images_path = http_path + "/" + generated_images_dir
http_generated_images_path = http_images_path
output_style = (environment == :production) ? :compressed : :expanded