I am getting very strange outputs from my IRB console. Here it is:
irb(main):001:0> File.dirname(__FILE__)
=> ←[0;31m"←[0;0m←[0;36m.←[0;0m←[0;31m"←[0;0m
Seems like an encoding issue, right? I am not sure why this is happening. Any ideas how to fix it?
Those are escape codes used to set colors in a terminal program; probably most popularly to colour a prompt in an xterm or compatible terminal. My bash prompt environment variable, for example, looks like this:
It looks like some string like that one is getting into your console and confusing it (since it’s not bash and/or in an xterm-friendly terminal emulator, I guess).