Skip to content

Instantly share code, notes, and snippets.

@roothybrid7
Created May 13, 2011 19:23
Show Gist options
  • Save roothybrid7/971144 to your computer and use it in GitHub Desktop.
Save roothybrid7/971144 to your computer and use it in GitHub Desktop.
config/initializers/windows.rb(rails3 windows console)
if Bundler::WINDOWS
require 'nkf'
class << $stdout
def write_with_conversion(str)
write_without_conversion NKF.nkf('-sxm0', str.to_s)
end
alias_method_chain :write, :conversion
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment