刚刚安装了断点并尝试在现有的博客项目(html/css/js/php)上使用。目前使用 Sass 和 Susy 来处理基本的网格内容,但我想在这个项目上尝试一下 Breakpoint,因为我最近意识到它的易用性和灵活使用。
安装成功后,将以下内容添加到我的项目中:
require 'breakpoint'
到 config.rb 文件
@import "breakpoint"
sass 中的 _base 文件。
刷新后,浏览器中出现此错误消息:
Syntax error: File to import not found or unreadable: breakpoint.\A Load paths:\A /Users/pbj/Desktop/code/the-start/themes/thestart/sass\A /Library/Ruby/Gems/2.0.0/gems/compass-0.12.3/frameworks/blueprint/stylesheets\A /Library/Ruby/Gems/2.0.0/gems/compass-0.12.3/frameworks/compass/stylesheets\A /Library/Ruby/Gems/2.0.0/gems/susy-1.0.9/sass\A Compass::SpriteImporter\A on line 6 of /Users/pbj/Desktop/code/the-start/themes/thestart/sass/_base.scss\A from line 5 of /Users/pbj/Desktop/code/the-start/themes/thestart/sass/screen.scss\A \A 1: /Users/pbj/Desktop/code/the-start/themes/thestart/sass/screen.scss"
命令行中也出现此错误:
Errno::EACCES on line ["1143"] of /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb: Permission denied - /Library/Ruby/Gems/2.0.0/gems/compass-core-1.0.0.alpha.17/stylesheets/.listen_test
Run with --trace to see the full backtrace
在运行完整的回溯后,我在命令行中得到了这个:
Errno::EACCES on line ["1143"] of /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb: Permission denied - /Library/Ruby/Gems/2.0.0/gems/compass-core-1.0.0.alpha.17/stylesheets/.listen_test
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1143:in
open'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1143:in
rescue in block in touch'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1139:in block in touch'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1137:in
each'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1137:in touch'
/Library/Ruby/Gems/2.0.0/gems/listen-1.1.6/lib/listen/adapter.rb:221:in
works?'
/Library/Ruby/Gems/2.0.0/gems/listen-1.1.6/lib/listen/adapter.rb:182:in block in usable_and_works?'
/Library/Ruby/Gems/2.0.0/gems/listen-1.1.6/lib/listen/adapter.rb:182:in
each'
/Library/Ruby/Gems/2.0.0/gems/listen-1.1.6/lib/listen/adapter.rb:182:in all?'
/Library/Ruby/Gems/2.0.0/gems/listen-1.1.6/lib/listen/adapter.rb:182:in
usable_and_works?'
/Library/Ruby/Gems/2.0.0/gems/listen-1.1.6/lib/listen/adapter.rb:49:in block in select_and_initialize'
/Library/Ruby/Gems/2.0.0/gems/listen-1.1.6/lib/listen/adapter.rb:47:in
each'
/Library/Ruby/Gems/2.0.0/gems/listen-1.1.6/lib/listen/adapter.rb:47:in select_and_initialize'
/Library/Ruby/Gems/2.0.0/gems/listen-1.1.6/lib/listen/listener.rb:272:in
initialize_adapter'
/Library/Ruby/Gems/2.0.0/gems/listen-1.1.6/lib/listen/listener.rb:264:in setup'
/Library/Ruby/Gems/2.0.0/gems/listen-1.1.6/lib/listen/listener.rb:64:in
start!'
/Library/Ruby/Gems/2.0.0/gems/compass-1.0.0.alpha.18/lib/compass/watcher/project_watcher.rb:31:in watch!'
/Library/Ruby/Gems/2.0.0/gems/compass-1.0.0.alpha.18/lib/compass/commands/watch_project.rb:48:in
perform'
/Library/Ruby/Gems/2.0.0/gems/compass-1.0.0.alpha.18/lib/compass/commands/base.rb:18:in execute'
/Library/Ruby/Gems/2.0.0/gems/compass-1.0.0.alpha.18/lib/compass/commands/project_base.rb:19:in
execute'
/Library/Ruby/Gems/2.0.0/gems/compass-1.0.0.alpha.18/lib/compass/exec/sub_command_ui.rb:43:in perform!'
/Library/Ruby/Gems/2.0.0/gems/compass-1.0.0.alpha.18/lib/compass/exec/sub_command_ui.rb:15:in
run!'
/Library/Ruby/Gems/2.0.0/gems/compass-1.0.0.alpha.18/bin/compass:30:in block in <top (required)>'
/Library/Ruby/Gems/2.0.0/gems/compass-1.0.0.alpha.18/bin/compass:44:in
call'
/Library/Ruby/Gems/2.0.0/gems/compass-1.0.0.alpha.18/bin/compass:44:in <top (required)>'
/usr/bin/compass:23:in
load'
/usr/bin/compass:23:in `'
当我安装断点时,它也安装了:
- sass-3.3.0.rc.6
- 罗盘-1.0.0.alpha.18
- 断点-2.4.1
当我检查当前版本的 sass 时,它是 sass-3.3.0.rc.6。
不确定到底发生了什么。我确实读过类似的问题,其中解决方案是调用compass watch
config.rb 文件的父目录,或者类似的东西。仍然以同样的错误结束。
编辑:当注释掉断点以尝试在不使用(暂时)的情况下继续前进时,浏览器中会抛出此错误:
"Syntax error: Undefined variable: \"$experimental-support-for-mozilla\".\A on line 25 of /Library/Ruby/Gems/2.0.0/gems/susy-1.0.9/sass/susy/_support.scss\A from line 5 of /Library/Ruby/Gems/2.0.0/gems/susy-1.0.9/sass/_susy.scss\A from line 5 of /Users/pbj/Desktop/code/the-start/themes/thestart/sass/_base.scss\A from line 5 of /Users/pbj/Desktop/code/the-start/themes/thestart/sass/screen.scss"
而命令行中的这个错误:
Errno::EACCES on line ["1143"] of /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb: Permission denied - /Library/Ruby/Gems/2.0.0/gems/compass-core-1.0.0.alpha.17/stylesheets/.listen_test
认为这是因为它试图使用 v3.3?
有人对如何解决这个问题有一些建议吗?
当前运行 15" MBPr OSX v.10.9.2 (Mavericks)