6

I cloned a GitHub directory because I wanted to help on an open-source project.

The link to the project is listed below, so feel free to try it out for yourself.

https://github.com/tupini07/RubyMan

According to the README, I did the following

git clone https://github.com/tupini07/RubyMan
cd projects/RubyMan
ruby main.rb

Edit

I solved the first issue by running gem install win32console, but I still run into the same problem.

Error Message

C:\Users\darkmouse\Documents\Projects\RubyMan>ruby main.rb
C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in 
`require': cannot load such file -- 2.0/Console_ext (LoadError)
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/win32console-1.3.2-x86-mingw32/
lib/Win32/Console.rb:12:in `rescue in <top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/win32console-1.3.2-x86-mingw32/
lib/Win32/Console.rb:8:in `<top (required)>'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/win32console-1.3.2-x86-mingw32/
lib/Win32/Console/ANSI.rb:13:in `<top (required)>'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/win32console-1.3.2-x86-mingw32/
lib/win32console.rb:1:in `<top (required)>'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:128:in `require'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:39:in `require'
from C:/Users/darkmouse/Documents/Projects/RubyMan/Board.rb:2:in `<top (required)>'
from main.rb:4:in `require_relative'
from main.rb:4:in `<main>'

Main.rb

3 require_relative 'player'
4 require_relative 'Board'
5 require_relative 'LoadLevel'

Board.rb

2 require 'win32console'

The issues are listed above.

I run a Windows 8 Operating System.

I'd prefer not to bombard the repository with issues, so I decided to ask here.

6
  • Can you post the entire stack trace?
    – August
    Commented Nov 17, 2014 at 23:42
  • by stack trace, do you mean the error message?
    – Darkmouse
    Commented Nov 17, 2014 at 23:43
  • Yes. It should show each line/method call where something went wrong.
    – August
    Commented Nov 17, 2014 at 23:45
  • It looks like it's an issue with require-relative. I have posted the full trace
    – Darkmouse
    Commented Nov 17, 2014 at 23:47
  • It looks like you need the win32console gem.
    – August
    Commented Nov 17, 2014 at 23:50

1 Answer 1

3

I forked this same GitHub project, RubyMan, and cloned it on Ubuntu 14.04 LTS. I installed the current stable release of Ruby 2.2.2. I ran into almost the same problem as above when I changed to the RubyMan folder and ran:

ruby Main.rb

Here is the stack trace:

/usr/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- colorize (LoadError)
    from /usr/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/ashok/RubyMan/Board.rb:1:in `<top (required)>'
    from Main.rb:3:in `require_relative'
    from Main.rb:3:in `block in <main>'
    from Main.rb:3:in `each'
    from Main.rb:3:in `<main>'

Others who ran into a similar problem suggested on GitHub to:

sudo gem install colorize

Result:

Successfully installed colorize-0.7.7

Unfortunately, the above problem didn't go away :( I tried many other suggestions. No luck.

However, these two steps resolved the problem: Step 1:

sudo gem update --system

Result:

RubyGems system software updated

I understand that this updates all installed gems to their latest versions.

Step 2:

sudo gem install colorize

Result:

Successfully installed colorize-0.7.7

Now I am able to launch the RubyMan program by running:

ruby Main.rb

Result:

What size will the board be?

And when I enter a number, it displays the 2D RubyMan game ready to play!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.