Last active
August 29, 2015 14:06
-
-
Save hgc81538/1566cabd816bb27bb254 to your computer and use it in GitHub Desktop.
ERROR: While executing gem ... (ArgumentError) invalid byte sequence in UTF-8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In Windows environment, the error is occured when executing "gem install compass" in cygwin. | |
$ gem install compass | |
ERROR: While executing gem ... (ArgumentError) | |
invalid byte sequence in UTF-8 | |
How to solve: | |
1) open C:\cygwin\usr\share\ruby\2.0.0\win32\registry.rb | |
(change to your version when necessary) | |
2) comment out line 172 and change "\r" to "\r\n" in line 173 (line numbers may vary) | |
from | |
---------------------- | |
msg = msg[0, len].force_encoding(Encoding.find(Encoding.locale_charmap)) | |
super msg.tr("\r", '').chomp | |
---------------------- | |
to | |
---------------------- | |
#msg = msg[0, len].force_encoding(Encoding.find(Encoding.locale_charmap)) | |
super msg.tr("\r\n", '').chomp | |
---------------------- | |
done. | |
Reference: | |
https://bugs.ruby-lang.org/issues/8508 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment