Diacritics on a directory path causes trouble starting Rails Server on Windows OS

Well, it seems that this is an unsolved issue that keeps ongoing. It has recently been reported in this answer and onto this question. But because the issues are staled on GitHub, it never got solved.

Asking here than for any help on how to solve this bug.

This seems like a Windows or Ruby on Windows bug.

From RAILS_ROOT can you exectute irb? What about commands like

File.open("C:\Users\john\Desktop\John Snow\Projects\Tractări Auto Flex\flex-site\bin\Gemfile") .read

substituting your path in place of what I copied from the SO example. If this works, then maybe this is a bug in Rails. It it does not work then the bug is in Windows or Ruby on Windows.

Here’s a different report of the same problem on Windows in C++. You could do some troubleshooting and maybe contribute a patch to Ruby. It might require compilation with #define UNICODE and/or #define _UNICODE. I’ve no idea the ramifications of that. It might also be Ruby version specific.

FYI this works for me on a Mac.

% mkdir Tractări   
% echo "Good day" > Tractări/file.txt
% irb
irb(main):001:0> File.open("Tractări/file.txt").read
=> "Good day\n"
1 Like

Thanks for the suggestions. Yes, it does work executing irb and the opening of files inside RAILS_ROOT, so yeah, maybe is a bug in Rails. I will look more into it and since the issue was re-opened on GitHub, I’ll try to do the suggested troubleshooting, see where it gets me. Thanks again for the very helpful input.