You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First the issue, even with win32console I can't get colors on windows:
irb(main):001:0> require 'ansi/code'
ansi: 'gem install win32console' to use color on Windows
The reason is that win32console is deprecated (and does not load on recent ruby versions). The good news is that, to the best of the my knowledge, it is no longer needed in ruby 2.0+.
The fix is very simple: don't require 'win32console' when ruby version is 2.0+ (assuming I am not missing anything here).
I verified this by changing code.rb, line 9 to: if RUBY_PLATFORM =~ /(win32|w32)/ && RUBY_VERSION < "2.0"
This seems to work fine for me.
The text was updated successfully, but these errors were encountered:
First the issue, even with win32console I can't get colors on windows:
The reason is that win32console is deprecated (and does not load on recent ruby versions). The good news is that, to the best of the my knowledge, it is no longer needed in ruby 2.0+.
The fix is very simple: don't require 'win32console' when ruby version is 2.0+ (assuming I am not missing anything here).
I verified this by changing code.rb, line 9 to:
if RUBY_PLATFORM =~ /(win32|w32)/ && RUBY_VERSION < "2.0"
This seems to work fine for me.
The text was updated successfully, but these errors were encountered: