Forums Archived

The forums are being archived. See this topic for more information.

ruby-opengl conflict [FIXED]

Get help and support with Rubygame

ruby-opengl conflict [FIXED]

Postby brandon » Thu Mar 11, 2010 4:17 pm

I just found an issue with having both rubygame and ruby-opengl gems installed. With just ruby-opengl installed, I get this (as expected):

Code: Select all
> require 'opengl'
=> true


Once rubygame is installed (which has no errors and works 100%) I get a NameError

Code: Select all
> 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:in `require'
        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:in `require'
        from (irb):1
        from C:/ruby/bin/irb.bat:20:in `<main>'


ruby-opengl is requiring gl.rb, but it's picking up the one in rubygame. Is there an easy fix for this?

It may be obvious from the snippets, but I'm running ruby 1.9.1 on 32-bit WinXP
Last edited by brandon on Thu Mar 11, 2010 9:15 pm, edited 1 time in total.
brandon
 
Posts: 9
Joined: Wed Mar 10, 2010 7:07 pm

Re: ruby-opengl conflict

Postby brandon » Thu Mar 11, 2010 9:15 pm

I did some more digging and ruby-opengl is trying to require their gl.so file. I simply renamed the gl.rb in rubygame to sdl_gl.rb (and edited the line in rubygame.rb that requires this file). All working now.
brandon
 
Posts: 9
Joined: Wed Mar 10, 2010 7:07 pm

Re: ruby-opengl conflict [FIXED]

Postby jacius » Fri Mar 12, 2010 5:56 am

Ah, thanks for the heads up about that. I'll rename gl.rb in the next Rubygame release so it won't cause that conflict anymore.
User avatar
jacius
Site Admin
 
Posts: 131
Joined: Fri Feb 06, 2009 11:13 pm

Re: ruby-opengl conflict [FIXED]

Postby tyler » Thu Apr 15, 2010 5:34 am

Did you ever commit the fix for this, Jacius? 'cus gl.rb wasn't renamed in the latest release...
tyler
 
Posts: 25
Joined: Sat Feb 28, 2009 6:10 am

Re: ruby-opengl conflict [FIXED]

Postby jacius » Fri Apr 16, 2010 6:14 am

Woops, sorry, forgot about this. :oops:

I investigated a bit more, and it turns out the core problem was a misunderstanding about the "require_paths" setting for gems. I've just published gem version 2.6.4 which fixes this. You should uninstall all past versions of the Rubygame gem, then install 2.6.4.

Thanks for the bug report!
User avatar
jacius
Site Admin
 
Posts: 131
Joined: Fri Feb 06, 2009 11:13 pm

Re: ruby-opengl conflict [FIXED]

Postby tyler » Fri Apr 16, 2010 10:58 pm

Thanks for the fix!
tyler
 
Posts: 25
Joined: Sat Feb 28, 2009 6:10 am


Return to Help & Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron