New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding::UndefinedConversionError on line ["545"] of /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/haml/util.rb: "\xE2" from ASCII-8BIT to UTF-8 #205

Closed
yvesvanbroekhoven opened this Issue Oct 12, 2010 · 5 comments

Comments

Projects
None yet
2 participants
@yvesvanbroekhoven

yvesvanbroekhoven commented Oct 12, 2010

Hi,

since this morning I get this error when I try to include @import "compass"; into my .scss file.

Any ideas what I'm doing wrong?

Backtrace:

Encoding::UndefinedConversionError on line ["545"] of /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/haml/util.rb: "\xE2" from ASCII-8BIT to UTF-8
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/haml/util.rb:545:in check_sass_encoding' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/engine.rb:222:incheck_encoding!'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/engine.rb:202:in _to_tree' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/engine.rb:178:inblock in to_tree'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/haml/util.rb:289:in silence_haml_warnings' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/engine.rb:178:into_tree'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/files.rb:44:in tree_for' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/import_node.rb:75:inperform!'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/node.rb:305:in _perform' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/import_node.rb:64:in_perform'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/node.rb:213:in perform' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/root_node.rb:37:inperform'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/node.rb:326:in block in perform_children' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/node.rb:326:inmap'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/node.rb:326:in perform_children' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/import_node.rb:78:inperform!'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/node.rb:305:in _perform' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/import_node.rb:64:in_perform'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/node.rb:213:in perform' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/root_node.rb:37:inperform'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/node.rb:326:in block in perform_children' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/node.rb:326:inmap'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/node.rb:326:in perform_children' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/import_node.rb:78:inperform!'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/node.rb:305:in _perform' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/import_node.rb:64:in_perform'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/node.rb:213:in perform' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/root_node.rb:37:inperform'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/node.rb:326:in block in perform_children' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/node.rb:326:inmap'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/node.rb:326:in perform_children' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/node.rb:317:inperform!'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/root_node.rb:59:in perform!' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/node.rb:305:in_perform'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/node.rb:213:in perform' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/root_node.rb:37:inperform'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/tree/root_node.rb:29:in render' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/engine.rb:196:in_render'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/engine.rb:168:in block in render' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/haml/util.rb:289:insilence_haml_warnings'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/lib/sass/engine.rb:168:in render' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/compass-0.10.5/lib/compass/compiler.rb:103:inblock in compile'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/compass-0.10.5/lib/compass/logger.rb:43:in red' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/compass-0.10.5/lib/compass/compiler.rb:102:incompile'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/compass-0.10.5/lib/compass/compiler.rb:93:in compile_if_required' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/compass-0.10.5/lib/compass/compiler.rb:84:inblock in run'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/compass-0.10.5/lib/compass/compiler.rb:82:in each' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/compass-0.10.5/lib/compass/compiler.rb:82:inrun'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/compass-0.10.5/lib/compass/commands/watch_project.rb:92:in recompile' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/vendor/fssm/lib/fssm/path.rb:71:incall'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/vendor/fssm/lib/fssm/path.rb:71:in run_callback' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/vendor/fssm/lib/fssm/path.rb:54:incallback_action'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/vendor/fssm/lib/fssm/path.rb:34:in update' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/vendor/fssm/lib/fssm/state/directory.rb:32:inblock in modified'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/vendor/fssm/lib/fssm/state/directory.rb:31:in each' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/vendor/fssm/lib/fssm/state/directory.rb:31:inmodified'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/vendor/fssm/lib/fssm/state/directory.rb:16:in refresh' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/vendor/fssm/lib/fssm/backends/polling.rb:17:inblock (2 levels) in run'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/vendor/fssm/lib/fssm/backends/polling.rb:17:in each' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/vendor/fssm/lib/fssm/backends/polling.rb:17:inblock in run'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/vendor/fssm/lib/fssm/backends/polling.rb:15:in loop' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/vendor/fssm/lib/fssm/backends/polling.rb:15:inrun'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/vendor/fssm/lib/fssm/monitor.rb:24:in run' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/haml-3.0.21/vendor/fssm/lib/fssm.rb:17:inmonitor'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/compass-0.10.5/lib/compass/commands/watch_project.rb:61:in perform' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/compass-0.10.5/lib/compass/commands/base.rb:18:inexecute'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/compass-0.10.5/lib/compass/commands/project_base.rb:19:in execute' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/compass-0.10.5/lib/compass/exec/sub_command_ui.rb:38:inperform!'
/Users/yves/.rvm/gems/ruby-1.9.2-head/gems/compass-0.10.5/lib/compass/exec/sub_command_ui.rb:15:in run!' /Users/yves/.rvm/gems/ruby-1.9.2-head/gems/compass-0.10.5/bin/compass:26:in<top (required)>'
/usr/local/bin/compass:19:in load' /usr/local/bin/compass:19:in

'

@yvesvanbroekhoven

This comment has been minimized.

yvesvanbroekhoven commented Oct 12, 2010

Ok, found a solution, just installed the latest version of compass by "gem install compass --pre" and the problem seems to be solved

@yvesvanbroekhoven

This comment has been minimized.

yvesvanbroekhoven commented Oct 12, 2010

Strang but true, the error is back?!

@yvesvanbroekhoven

This comment has been minimized.

yvesvanbroekhoven commented Oct 12, 2010

Moved back to ruby 1.8.7, problem solved

@nex3

This comment has been minimized.

Contributor

nex3 commented Oct 12, 2010

This error can occur if your operating system is set so that ASCII is the default encoding, but your Sass file contains Unicode characters. I'd highly recommend finding and fixing the relevant OS setting, but failing that you can also add @charset "utf-8" at the very beginning of the file (before any comments).

@yvesvanbroekhoven

This comment has been minimized.

yvesvanbroekhoven commented Oct 14, 2010

Ok, thanks for the advice!

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment