18

When I want to install sass and compass, I get this message. Can someone help me?

Microsoft Windows [version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Tous droits réservés.

C:\Users\Bk>gem install sass

ERROR:  While executing gem (Encoding::UndefinedConversionError)
    U+2019 to CP850 in conversion from UTF-16LE to UTF-8 to CP850

3 Answers 3

63

Open up a command prompt and type:

chcp 1252

Then run the installer again:

gem install sass

Unfortunately there's a known issue in some versions of Ruby regarding this. See here

1
16

Here is what worked for me:

modified line 70 of registry.rb (in your ruby installation folder).

Change this line:

LOCALE = Encoding.find(Encoding.locale_charmap)

to this one:

LOCALE = Encoding::UTF_8
3
  • I have the same problem as OP, but I cannot find the registry.rb file. Nor does chcp 1252 work for me. Might I ask what the problem exactly is? Thanks in any case.
    – awllower
    Dec 20, 2014 at 8:56
  • where can I find this file? Feb 2, 2021 at 23:52
  • in your ruby installation folder
    – vlio20
    Feb 3, 2021 at 6:54
-1

to resolve this problem you have to install an old version of ruby and delete the latest versions on your pc i think there is an error on the latest version,look for this version and download it 1.8.7

2

Not the answer you're looking for? Browse other questions tagged or ask your own question.