我在 Oneiric 上安装了 Compass(一个 ruby 宝石),没有任何问题,我已经更新到精确格式 / 并保留 /home,所以我需要重新安装 ruby。
当我编译 SCSS 文件时出现此错误:
compass watch --trace
12:45:09 检测到的更改:style.scss overwrite css/style.css
亲爱的在项目中使用 FSSM 的开发人员,FSSM 目前基本上已经过时了。新的共享守卫/监听项目将进一步开发。如果您需要过渡帮助,请告诉我们!^_^b - Travis Tilley
Compass 正在轮询更改。按 Ctrl-C 停止。 /usr/lib/ruby/1.9.1/pathname.rb 的 ["45"] 行上出现 ArgumentError: US-ASCII 中的字节序列无效 /usr/lib/ruby/1.9.1/pathname.rb:45:in
chop_basename' /usr/lib/ruby/1.9.1/pathname.rb:101:in
cleanpath_aggressive' /usr/lib/ruby/1.9.1/pathname.rb:89:incleanpath' /usr/lib/ruby/1.9.1/pathname.rb:451:in
relation_path_from' /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/path.rb:81:insplit_path' /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/path.rb:69:in
run_callback' /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/path.rb:55:incallback_action' /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/path.rb:35:in
update' /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/state/directory.rb:39:inblock in modified' /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/state/directory.rb:37:in
each' /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/state/directory.rb:37:inmodified' /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/state/directory.rb:18:in
刷新' /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/backends/polling.rb:17:inblock (2 levels) in run' /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/backends/polling.rb:17:in
每个' /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/backends/polling.rb:17:inblock in run' /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/backends/polling.rb:15:in
循环' /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/backends/polling.rb:15:inrun' /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/monitor.rb:26:in
运行' /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm.rb:70:inmonitor' /var/lib/gems/1.9.1/gems/compass-0.12.1/lib/compass/commands/watch_project.rb:87:in
执行' /var/lib/gems/1.9.1/gems/compass-0.12.1/lib/compass/commands/base.rb:18:inexecute' /var/lib/gems/1.9.1/gems/compass-0.12.1/lib/compass/commands/project_base.rb:19:in
执行' /var/lib/gems/1.9.1/gems/compass-0.12.1/lib/compass/exec/sub_command_ui.rb:43:inperform!' /var/lib/gems/1.9.1/gems/compass-0.12.1/lib/compass/exec/sub_command_ui.rb:15:in
运行!' /var/lib/gems/1.9.1/gems/compass-0.12.1/bin/compass:29:in调用block in <top (required)>' /var/lib/gems/1.9.1/gems/compass-0.12.1/bin/compass:43:in
' /var/lib/gems/1.9.1/gems/compass-0.12.1/bin/compass:43:in<top (required)>' /usr/local/bin/compass:19:in
加载' /usr/local/bin/compass:19:in `'
第一次更改 scss 文件时没有出现此错误,但第二次出现了。
有任何想法吗?
此外,指南针在某些文件中“吃掉”了一个“s”,并且将它们编译为“tyle.css”,而不是“style.css”(根据文件名称应该是这样的)。
编辑:我将在 StackOverflow 上询问这个问题,因为我认为这个问题与 ruby 本身有关,而与 Ubuntu 无关。
答案1
看来这是 repos 中某些库的问题。使用 RVM 安装 ruby 解决了这个问题。