This seems like a Windows or Ruby on Windows bug.
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
=> "Good day\n"