Ruby-opengl gem not working on 1.9?

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.

···

--
Posted via http://www.ruby-forum.com/.

Thomas B. wrote:

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&gt;\),
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

Jan Dvorak wrote:

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&gt;\),
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.

···

--
Posted via http://www.ruby-forum.com/\.

You should set required_ruby_version in for your gem as well.

···

On Mar 3, 2009, at 11:58, Jan Dvorak wrote:

Thomas B. wrote:

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&gt;\),
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).

Eric Hodel wrote:

You should set required_ruby_version in for your gem as well.

Thanks, it should be set now for both binary gems.

Jan