Installing Ruby from rubyinstaller-devkit-2.7.2-1-x64 and running ruby-v
displays the following:
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x64-mingw32]
However, if you try to do anything else (such as installing a gem), the following message appears:
Traceback (most recent call last): ruby.exe:unknown encoding name-
utf-8;-Eutf-8;-Eutf-8;-Eutf-8;-Eutf-8;-Eutf-8;-Eutf-8;-Eutf-8;-Eutf-8;-Eutf-8;-U
(RuntimeError)
During Ruby installation, "use utf-8 as default~" was checked and installed.
What's the problem?Please let me know if there is a solution.
The PC is window 10,64bit.
ruby windows
This is not a Ruby or Gem issue you tried to install.
C:\>set RUBYOPT=-Eutf-8;-Eutf-8;-Eutf-8;-Eutf-8;-Eutf-8;-Eutf-8;-Eutf-8;-Eutf-8;-Eutf-8;-Eutf-8;-U
C:\>ruby-v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x64-mingw32]
C:\>ruby
Traceback (most recent call last):
ruby —unknown encoding name-utf-8;-Eutf-8;-Eutf-8;-Eutf-8;-Eutf-8;-Eutf-8;-Eutf-8;-Eutf-8;-Eutf-8;-Eutf-8;-Eutf-8;-Eutf-8;-U (RuntimeError)
For some reason, I think that the PC had an incorrect RUBYOPT
environment variable.
© 2024 OneMinuteCode. All rights reserved.