ruby-opengl gem not working on 1.9?

T

Thomas B.

Hello. I have a problem with making ruby-opengl work on Ruby 1.9.1,
Windows.

I download the gem named ruby-opengl-0.60.1-x86-mswin32.gem and install
it - the installation is successful. But then when I try to require
'opengl', I get a Windows error that the file msvcrt-ruby18.dll cannot
be loaded.

If I take the file msvcrt-ruby18.dll from Ruby 1.8.6 and put it in 1.9's
bin dir, then I get:
[BUG] cross-thread violation on rb_gc()
ruby 1.8.6 (2008-08-11) [i386-mswin32]
So the error says that I'm using Ruby 1.8, but at the time of this test
Ruby 1.8 wasn't even on my PATH (I renamed its directory to avoid
collisions).

But if I take the file msvcrt-ruby191.dll that comes with Ruby 1.9 and
rename it to msvcrt-ruby18.dll then I get an elaborate segmentation
fault from gl.so (but at least now the Ruby version reported is ruby
1.9.1p0).

I see that the name msvcrt-ruby18.dll is referenced from inside gl.so,
glu.so and glut.so, so it looks to me like there's no way to use it
under Ruby 1.9 without recompiling or something. But is there any
simpler solution? I'd rather not compile opengl myself.

I can't find any information about the problems I encounter on the
ruby-opengl's website nor anywhere. All I see is they suggest that it
should work with Ruby 1.9 too. Anyone else has had this kind of
problems?

Thanks in advance.
 
J

Jan Dvorak

Thomas said:
Hello. I have a problem with making ruby-opengl work on Ruby 1.9.1,
Windows.

I download the gem named ruby-opengl-0.60.1-x86-mswin32.gem and install
it - the installation is successful. But then when I try to require
'opengl', I get a Windows error that the file msvcrt-ruby18.dll cannot
be loaded.
Yes, ruby 1.8 and 1.9 are not binary compatible in general, the binary
gem on rubyforge is intended for use with ruby 1.8. I just uploaded on
rubyforge gem compiled against 1.9.1
(ruby-opengl-0.60.1-x86-mswin32-ruby19.gem
<http://rubyforge.org/frs/download.php/52648/ruby-opengl-0.60.1-x86-mswin32-ruby19.gem>),
so try that out. It should work with ruby 1.9.1 from ruby-lang.org (or
any other 1.9 version compiled with MSVC6).

Jan
 
T

Thomas B.

Jan said:
Yes, ruby 1.8 and 1.9 are not binary compatible in general, the binary
gem on rubyforge is intended for use with ruby 1.8. I just uploaded on
rubyforge gem compiled against 1.9.1
(ruby-opengl-0.60.1-x86-mswin32-ruby19.gem
<http://rubyforge.org/frs/download.php/52648/ruby-opengl-0.60.1-x86-mswin32-ruby19.gem>),
so try that out. It should work with ruby 1.9.1 from ruby-lang.org (or
any other 1.9 version compiled with MSVC6).

Jan

Seems to work with no problems. Thank you very much! I'm going to use
Ruby with OpenGL in my MSc project so it's really great that I can use
Ruby 1.9 now.

Tom.
 
E

Eric Hodel

Yes, ruby 1.8 and 1.9 are not binary compatible in general, the binary
gem on rubyforge is intended for use with ruby 1.8. I just uploaded on
rubyforge gem compiled against 1.9.1
(ruby-opengl-0.60.1-x86-mswin32-ruby19.gem
<http://rubyforge.org/frs/download.php/52648/ruby-opengl-0.60.1-x86-mswin32-ruby19.gem
so try that out. It should work with ruby 1.9.1 from ruby-lang.org (or
any other 1.9 version compiled with MSVC6).

You should set required_ruby_version in for your gem as well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top