2

I tried with last version with ruby, but when run gem install rails, always got an error

ERROR:  While executing gem ... (Encoding::UndefinedConversionError)
    U+041D to IBM437 in conversion from UTF-16LE to UTF-8 to IBM437

I am using windows 8.

but gem list ---local working.. only on install, my locale set english.

what kind problem is it?

Armen Arzumanyan
  • 1,939
  • 3
  • 30
  • 56
  • 4
    Just drop the idea of developing ruby/rails on windows. If you don't want to use Linux as your primary OS then got with dual boot or some virtual machine (VirtualBox, VmWare etc). – Adrian Serafin Dec 05 '14 at 21:58

2 Answers2

13

Use this link: https://bugs.ruby-lang.org/issues/10300

They said that you need to chance the enconding at The registry.rb file:

Folder: Ruby2.1.0\lib\ruby\2.1.0\win32 File: registry.rb Line: 70

- LOCALE = Encoding.find(Encoding.locale_charmap)
+ LOCALE = Encoding::UTF_8
+ #LOCALE = Encoding.find(Encoding.locale_charmap)
Raphael Cangucu
  • 191
  • 1
  • 5
1

We'll need more information to solve your problem. What command are you running?

The meaning of the exception is that some character in the gem is invalid in ibm437, a common 'extended ascii' encoding on Windows machines.

You may be to work around the problem by setting your internal encoding to UTF-8. Encoding.default_internal = Encoding::UTF_8

Would you mind adding the output a running a ruby file containing just the following:

p [Encoding.default_external, Encoding.default_internal, __ENCODING__, Encoding.find('filesystem'), Encoding.find('locale')]

Thanks. If you only do it in irb that's fine to.

BF4
  • 1,076
  • 7
  • 23