NameError - confused gems?

I have 2 gems installed: ruby-opengl and rubygame. Both gems contain
their own gl.rb file. When just ruby-opengl is installed, I can require
it fine:

require ‘opengl’
=> true

Once I install rubygame, I get the NameError

require ‘opengl’
NameError: uninitialized constant Rubygame
from
C:/ruby/lib/ruby/gems/1.9.1/gems/rubygame-2.6.2/lib/rubygame/gl.rb:35:in
<top (required)>' from C:/ruby/lib/ruby/gems/1.9.1/gems/ruby-opengl-0.60.1-x86-mswin32/lib/opengl.rb:23:inrequire’
from
C:/ruby/lib/ruby/gems/1.9.1/gems/ruby-opengl-0.60.1-x86-mswin32/lib/opengl.rb:23:in
<top (required)>' from (irb):1:inrequire’
from (irb):1
from C:/ruby/bin/irb.bat:20:in `’

Apparently the ruby-opengl gem is calling require ‘gl’ and it’s picking
up the one in rubygame. Is this fixable on my part (gem load path)? Or
will some change be required in one/both installed gems?

I did some digging and it turns out that renaming rubygame’s file fixed
the problem. ruby-opengl was trying to require the gl.so file.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs