[ruby-opengl-devel] gem install ruby-opengl fails

Alain Hoang hoanga at alum.rpi.edu
Wed Oct 10 20:23:20 EDT 2007

Hi Daniel,

Daniel Drucker wrote:
> Hi,
> Do you have any idea what I need to do here?

	I think so. [1]  I just reproduced the same
error on my Powerbook as well to my dismay.

> I have glut, glut-shlibs, & opengl-rb18 installed via fink.
> This seems to be a widespread unsolved problem, judging from google 
> results.
> drbrown:~ dmd$ sudo gem install -y ruby-opengl net-ssh -r
> Attempting remote installation of 'ruby-opengl'
> Select which gem to install for your platform (i686-darwin)
> 1. ruby-opengl 0.40.1 (i386-mswin32)
> 2. ruby-opengl 0.40.1 (ruby)
> 3. ruby-opengl 0.40.0 (ruby)
> 4. ruby-opengl 0.33.0 (ruby)
> 5. Cancel installation
>  > 2
> Building native extensions.  This could take a while...
> ERROR:  While executing gem ... (RuntimeError)
>     ERROR: Failed to build gem native extension.
> Gem files will remain installed in 
> /sw/var/lib/gems/1.8/gems/ruby-opengl-0.40.1 for inspection.
>   ruby Rakefile install -y ruby-opengl net-ssh -r\n

    I'm not sure how to fix this cleanly at the moment but I believe 
here is a dirty hack to ensure that it builds.

1. Ensure the latest version of mkrf is installed
   $ gem update -y mkrf
2. Set the environment variable named MACOSX_DEPLOYMENT to something
    matching your OS X version (in my case 10.4)
   # In bourne-shell or bash
   # In tcsh or csh
3. Now run gem install
   $ sudo gem install ruby-opengl

This got the bindings to build for me in OS X.  I'll look into how to
get this to 'just work' when I get some spare cycles.


[1] http://developer.apple.com/qa/qa2001/qa1233.html

More information about the ruby-opengl-devel mailing list