2

I had Compass 0.12 (a ruby gem) installed on Ubuntu Oneiric with no problems I have updated to Precise formatting / and keeping /home, so I needed to reinstall ruby (1.9.3).

I get this error now when I compile a SCSS file:

compass watch --trace

            Change detected at 12:45:09 to: style.scss overwrite css/style.css

Dear developers making use of FSSM in your projects, FSSM is essentially dead at this point. Further development will be taking place in the new shared guard/listen project. Please let us know if you need help transitioning! ^_^b - Travis Tilley

>>> Compass is polling for changes. Press Ctrl-C to Stop.
ArgumentError on line ["46"] of /usr/lib/ruby/1.9.1/pathname.rb: invalid byte sequence in US-ASCII
  /usr/lib/ruby/1.9.1/pathname.rb:46:in `chop_basename'
  /usr/lib/ruby/1.9.1/pathname.rb:102:in `cleanpath_aggressive'
  /usr/lib/ruby/1.9.1/pathname.rb:90:in `cleanpath'
  /usr/lib/ruby/1.9.1/pathname.rb:452:in `relative_path_from'
  /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/path.rb:82:in `split_path'
  /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/path.rb:70:in `run_callback'
  /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/path.rb:56:in `callback_action'
  /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/path.rb:36:in `update'
  /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/state/directory.rb:39:in `block 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:in `modified'
  /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/state/directory.rb:18:in `refresh'
  /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/backends/polling.rb:17:in `block (2 levels) in run'
  /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/backends/polling.rb:17:in `each'
  /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/backends/polling.rb:17:in `block in run'
  /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/backends/polling.rb:15:in `loop'
  /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/backends/polling.rb:15:in `run'
  /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm/monitor.rb:26:in `run'
  /var/lib/gems/1.9.1/gems/fssm-0.2.9/lib/fssm.rb:70:in `monitor'
  /var/lib/gems/1.9.1/gems/compass-0.12.1/lib/compass/commands/watch_project.rb:89:in `perform'
  /var/lib/gems/1.9.1/gems/compass-0.12.1/lib/compass/commands/base.rb:18:in `execute'
  /var/lib/gems/1.9.1/gems/compass-0.12.1/lib/compass/commands/project_base.rb:19:in `execute'
  /var/lib/gems/1.9.1/gems/compass-0.12.1/lib/compass/exec/sub_command_ui.rb:43:in `perform!'
  /var/lib/gems/1.9.1/gems/compass-0.12.1/lib/compass/exec/sub_command_ui.rb:15:in `run!'
  /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 `call'
  /var/lib/gems/1.9.1/gems/compass-0.12.1/bin/compass:43:in `<top (required)>'
  /usr/local/bin/compass:19:in `load'
  /usr/local/bin/compass:19:in `<main>'

(The "Dear developers" message is part of the output).

This error doesn't appear the first time I make a change to the scss file, but the second.

In addition, compass "eats" one "s" in some files and, instead of compiling them as "style.css" (what it should be from the file's name) it does as "tyle.css".

I've spend 3 hours looking at similar problems here but I couldn't solve it. I tried including # encoding: utf-8 on the top of some files with no luck.

Please explain step by step what should I do, since I am a total noob with Ruby (I just use it because of SASS).

4

2 に答える 2

2

私が見ることができることから、問題のファイルには、問題pathname.rbがどこにあるように見えるこの関数が含まれています:

def chop_basename(path)
  base = File.basename(path)
  if /\A#{SEPARATOR_PAT}?\z/o =~ base
    return nil
  else
    return path[0, path.rindex(base)], base
  end
end
private :chop_basename

同じ問題の同様の質問へのリンクは次のとおりです。

アプリのパスにASCII以外の文字が含まれている場合、RubyonRailsアプリケーションはPassengerの使用を開始しません

したがって、修正は明らかにus-asciiパス名に固執することです。

そのクラスのドキュメントの抜粋は次のとおりです。

パス名は、ファイルシステム内のファイルを検索するパス名を表します。パス名はOSによって異なります:Unix、Windowsなど。パス名ライブラリはローカルOSのパス名で動作します。ただし、Unix以外のパス名は実験的にサポートされています。

以前は機能し、現在は機能しない理由については、言うのは難しいです。システム上の他のライブラリが変更されたか、ruby 1.9.3にアップグレードすると、エラーが発生する小さな変更が発生した可能性があります。

于 2012-05-17T01:22:34.280 に答える
2

I think there is some problem with the pathname, maybe it contains an invalid non-ASCII sequence; probably the eaten "s" is the problem, maybe it is an invalid character, or maybe a character near to it; try to ensure path is ASCII.

Or maybe a bug in precise readline package? Try to install ruby 1.9.3 via RVM, RVM should use readline bundled with it (see the comments below for details)

于 2012-05-12T01:06:20.880 に答える