Forum: Ruby win32console problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
923f2566e3d33fb812b0d9cc2249bc72?d=identicon&s=25 Jake J. (-smells-of-rot)
on 2009-05-11 02:14
I looked around and couldn't find a topic on this, but if I missed it,
please refer me to the topic location.

I am very new to ruby, so this is probably a simple question.

Here is my code:

<code>
begin
  require 'rubygems'
rescue LoadError
end

require 'win32console'
require 'term/ansicolor'

include Win32::Console::ANSI

class String
  include Term::ANSIColor
end

Win32Console.background_color :red
</code>

My the result I get is " uninitialized constant Win32Console
(NameError)". What am I doing wrong?

Thanks.
This topic is locked and can not be replied to.