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
sawa
  • 165,429
  • 45
  • 277
  • 381

3 Answers3

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

Anthony
  • 15,435
  • 4
  • 39
  • 69
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
vlio20
  • 8,955
  • 18
  • 95
  • 180
-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

  • There are many newer versions of Ruby than 1.8.7, http://rubyinstaller.org/downloads/. Ruby 1.8 and 1.9 have been end-of-lifed as of July, 2014, so I wouldn't recommend using them. https://www.ruby-lang.org/en/news/2014/07/01/eol-for-1-8-7-and-1-9-2/ – rdubya Dec 28 '14 at 11:05
  • i tried the lastest version of ruby but i got the same error message when i was trying to install sass – Boevi Lawson Dec 29 '14 at 01:20