所以,我正在尝试设置我的 wp 主题以与 sass 一起使用。
我已将 style.css 重命名为 style.scss 并将其放入名为“sass”的文件夹中。然后我创建了一个名为 config.rb 的文件。我在里面写了
/* config.rb in the theme's root. */
css_dir = "/"
sass_dir = "sass"
output_style = :compressed
然后我尝试使用 compas.app 来查看文件夹(即在 FTP 服务器上,安装在 Finder 中)。我选择主题的根文件夹,然后按确定。两秒钟后,我收到一个错误:
'(RegexpError) 未指定重复运算符的目标:/* config.rb 在主题的根目录中。*/org/jruby/RubyKernel.java:1112:in eval'
/Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/configuration/serialization.rb:24:in
parse_string'/Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/configuration/serialization.rb: 15:_parse'
org/jruby/RubyIO.java:1139:in
打开'org/jruby/RubyKernel.java:296:open'
file:/Applications/compass.app/Contents/Resources/Java/lib/java/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/1.8/open-uri.rb:32:in
打开'/Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/configuration/serialization .rb:14:in _parse'
/Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/configuration/file_data.rb:7:in
new_from_file' /Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/configuration/inheritance.rb:204:in with_defaults'
/Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/configuration/file_data.rb:6:in
new_from_file' /Applications /compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/configuration/helpers.rb:42:inconfiguration_for'
/Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/configuration/helpers.rb:97:in
add_project_configuration' /Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/commands/project_base.rb:31:in add_project_configuration'
/Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/commands/project_base.rb:25:in
configure!' /Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/commands/project_base.rb:15:ininitialize'
/Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/commands/update_project.rb:37:in
初始化'文件:/Applications/compass.app/Contents /Resources/Java/compass-app.jar!/ui/tray.rb:417:in watch'
file:/Applications/compass.app/Contents/Resources/Java/compass-app.jar!/app.rb:207:in
try' 文件:/Applications/compass.app/Contents/Resources/Java/compass-app.jar!/ui/tray.rb :412:在watch'
file:/Applications/compass.app/Contents/Resources/Java/compass-app.jar!/ui/tray.rb:153:in
open_dir_handler' 文件中:/Applications/compass.app/Contents/Resources/Java/compass-app.jar!/ui/tray.rb:71:在run'
file:/Applications/compass.app/Contents/Resources/Java/compass-app.jar!/main.rb:115:in
run_tray' 文件中:/Applications/compass.app/Contents/资源/Java/compass-app.jar!/main.rb:131:in(root)'
org/jruby/RubyKernel.java:1062:in
需要'文件:/Applications/compass.app/Contents/Resources/Java/compass-app.jar!/main.rb:1:in `(root)''