wxruby problem

R

Rainer

Hello,

I have a problem trying to get wxruby to work with Ruby 1.9.1 on
Windows xp.

I typed "gem install wxruby"
I tried to run the sample "bigdemo.rb", which had already been working
under Ruby 1.8.6 some time ago.
This is what I get:
ruby bigdemo.rb
c:/ruby/lib/ruby/gems/1.9.1/gems/wxruby-2.0.0-x86-mswin32-60/lib/
wxruby2.so: [BUG] Segmentation fault
ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mswin32]

-- control frame ----------
c:0008 p:-2799958 s:0022 b:0022 l:000021 d:000021 TOP
c:0007 p:---- s:0020 b:0020 l:000019 d:000019 CFUNC :require
c:0006 p:0011 s:0016 b:0016 l:000015 d:000015 TOP c:/ruby/lib/ruby/
gems/1.9.1/gems/wxruby-2.0.0-x86-mswin32-60/lib/wx.rb:12
c:0005 p:---- s:0013 b:0013 l:000012 d:000012 FINISH
c:0004 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC :require
c:0003 p:0026 s:0007 b:0007 l:001f5c d:001088 EVAL bigdemo.rb:8
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:001f5c d:001f5c TOP <main>:352
---------------------------
-- Ruby level backtrace
information-----------------------------------------
c:/ruby/lib/ruby/gems/1.9.1/gems/wxruby-2.0.0-x86-mswin32-60/lib/wx.rb:
12:in `require'
c:/ruby/lib/ruby/gems/1.9.1/gems/wxruby-2.0.0-x86-mswin32-60/lib/wx.rb:
12:in `<top (required)>'
bigdemo.rb:8:in `require'
bigdemo.rb:8:in `<main>'

[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html


This application has requested the Runtime to terminate it in an
unusual way.
Please contact the application's support team for more information.
Exit code: 3


The file "c:/ruby/lib/ruby/gems/1.9.1/gems/wxruby-2.0.0-x86-mswin32-60/
lib/wxruby2.so" is where it should be.
I uninstalled and reinstalled wxWidgets again, using version 2.8.10
from http://wxwidgets.org/downloads/ with the Windows Installer
wxMSW). Again, no cigar.

Does anybody know what's going on here?

Kind regards,

Rainer
 
R

Rainer

Hi Rainer,

Try the 1.9 version of WxRuby:
  gem install wxruby-ruby19

Marvin

Hello Marvin,

thank you for the quick reply! Unfortunately, it didn't work. When I
type

gem install wxruby-ruby19

I get

ERROR: could not find gem wxruby-ruby19 locally or in a repository

Any further ideas?

Kind regards

Rainer

P.S.: I see that you posted your answer via ruby-forum. Does that mean
I should rather post there instead of comp.lang.ruby?
 
M

Marvin Gülker

Rainer said:
ERROR: could not find gem wxruby-ruby19 locally or in a repository

Any further ideas?
What's the version of RubyGems you are using?
This is the search result on my Windows XP SP3:
ruby -v
ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mingw32]
gem -v
1.3.5
gem search wxruby-ruby19 --remote

*** REMOTE GEMS ***

wxruby-ruby19 (2.0.0)
Are you using the mswin32 version of WxRuby? I run into problems
compiling it with MSVC and after many attempts I gave up and switched to
MinGW. I don't have any problems with this now.
BTW, WxRuby doesn't work with another version of Ruby 1.9 yet as with
1.9.1-p0. This is due to a change in the C API of Ruby. I was promised
that this will be fixed in the next release (see
http://www.ruby-forum.com/topic/187872#new ), but I don't know when this
will be (and since I'm using Linux Ubuntu most I won't recognize a new
Windows release quickly).
P.S.: I see that you posted your answer via ruby-forum. Does that mean
I should rather post there instead of comp.lang.ruby?
It's the same. comp.lang.ruby is mirrored by ruby-forum.com and
everything you post to the mailing list is visible to the people on
ruby-forum.com. The same goes the other way round.

Marvin
 
R

Rainer

Sorry, I meant Ruby, not WxRuby. :)

Marvin

Hello Marvin,

thanks for the reply. I had already looked up your posting on the
forum regarding this issue:
BTW, WxRuby doesn't work with another version of Ruby 1.9 yet as with
1.9.1-p0. This is due to a change in the C API of Ruby. I was promised
that this will be fixed in the next release (seehttp://www.ruby-forum.com/topic/187872#new), but I don't know when this
will be (and since I'm using Linux Ubuntu most I won't recognize a new
Windows release quickly).

So I did a fresh install of Ruby, using "mingw32-ruby-1.9.1-
wxruby-2.0.0-setup.exe" from rubyforge. That's a Ruby installation
with pre-installed wxRuby gems. Bigdemo.rb ran without any problems.
So I am going to reinstall and update my gems and everything should be
fine (hopefully).
What's the version of RubyGems you are using?

On the brand new Ruby installation (see above) I ran

gem -v

and found out that I was still using 1.3.1. So I typed:

gem update --system

This was the result:

---begin---
Updating RubyGems
Updating rubygems-update
Successfully installed rubygems-update-1.3.5
:0:Warning: Gem::SourceIndex#search support for String patterns is
deprecated
Updating RubyGems to 1.3.5
Installing RubyGems 1.3.5
c:/ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems/
config_file.
rb:39:in `new': wrong number of arguments (5 for 4) (ArgumentError)
from c:/ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/
lib/rubygems
/config_file.rb:39:in `<class:ConfigFile>'
from c:/ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/
lib/rubygems
/config_file.rb:12:in `<top (required)>'
from c:/ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/
lib/rubygems
/gem_runner.rb:8:in `require'
from c:/ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/
lib/rubygems
/gem_runner.rb:8:in `<top (required)>'
from setup.rb:25:in `require'
from setup.rb:25:in `<main>'
RubyGems system software updated
--end--

Now, when I type

gem -v

I get this:

---begin---
c:/ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems/
config_file.
rb:39:in `new': wrong number of arguments (5 for 4) (ArgumentError)
from c:/ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/
lib/rubygems
/config_file.rb:39:in `<class:ConfigFile>'
from c:/ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/
lib/rubygems
/config_file.rb:12:in `<top (required)>'
from c:/ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/
lib/rubygems
/gem_runner.rb:8:in `require'
from c:/ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/
lib/rubygems
/gem_runner.rb:8:in `<top (required)>'
from c:/ruby/bin/gem.bat:17:in `require'
from c:/ruby/bin/gem.bat:17:in `<main>'
---end---

Does this mean I have broken rubygems on mingw32 by typing "gem update
--system"? Typing

"gem search wxruby-ruby19 --remote"

or trying to install a gem - any gem - gives me the same argument
error.

Now I'm even more confused. "Bigdemo" is still working after the
failed rubygems upgrade, but now I'm unable to install any gems. Of
course, I can reinstall and stay with rubygems 1.3.1, but is this an
issue that should be reported to someone?

Kind regards,

Rainer
 
M

Marvin Gülker

Rainer said:
gem -v

and found out that I was still using 1.3.1. So I typed:

gem update --system

This was the result:

---begin---
Updating RubyGems
Updating rubygems-update
Successfully installed rubygems-update-1.3.5
:0:Warning: Gem::SourceIndex#search support for String patterns is
deprecated
Updating RubyGems to 1.3.5
Installing RubyGems 1.3.5
c:/ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems/
config_file.
rb:39:in `new': wrong number of arguments (5 for 4) (ArgumentError)
from c:/ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/
lib/rubygems
/config_file.rb:39:in `<class:ConfigFile>'
from c:/ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/
lib/rubygems
/config_file.rb:12:in `<top (required)>'
from c:/ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/
lib/rubygems
/gem_runner.rb:8:in `require'
from c:/ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/
lib/rubygems
/gem_runner.rb:8:in `<top (required)>'
from setup.rb:25:in `require'
from setup.rb:25:in `<main>'
RubyGems system software updated
--end--

Now, when I type

gem -v

I get this:

---begin---
c:/ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems/
config_file.
rb:39:in `new': wrong number of arguments (5 for 4) (ArgumentError)
from c:/ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/
lib/rubygems
/config_file.rb:39:in `<class:ConfigFile>'
from c:/ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/
lib/rubygems
/config_file.rb:12:in `<top (required)>'
from c:/ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/
lib/rubygems
/gem_runner.rb:8:in `require'
from c:/ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/
lib/rubygems
/gem_runner.rb:8:in `<top (required)>'
from c:/ruby/bin/gem.bat:17:in `require'
from c:/ruby/bin/gem.bat:17:in `<main>'
---end---

Does this mean I have broken rubygems on mingw32 by typing "gem update
--system"? Typing

"gem search wxruby-ruby19 --remote"

or trying to install a gem - any gem - gives me the same argument
error.

Now I'm even more confused. "Bigdemo" is still working after the
failed rubygems upgrade, but now I'm unable to install any gems. Of
course, I can reinstall and stay with rubygems 1.3.1, but is this an
issue that should be reported to someone?

Kind regards,

Rainer

Hi Rainer,
Some minuts ago I had the same problem. If you try to update RubyGems to
1.3.5 on a ruby-1.9.1-p0 installation you get this issue on Windows (I'm
too lazy to compile and test with Linux at the moment). I wasn't able to
undo the update, since RubyGems seems to be broken after the update.
There were some problems with the 1.3.5 version of RubyGems on Windows a
few days ago on the mailing list, but I don't remember what exactly. I
had to reinstall my ruby-1.9.1-p0 after updating RubyGems. Maybe it's
best not to update at the moment. When the new WxRuby is released, we
will (hopefully) be able to use it with ruby-1.9.1-p243 or the like. :)
Or try compiling it yourself against the MinGW GCC and the newest Ruby-
but I think you have WxWidgets to be installed for this.
Of
course, I can reinstall and stay with rubygems 1.3.1, but is this an
issue that should be reported to someone?
File a RubyGems bug:
http://rubyforge.org/tracker/?atid=575&group_id=126&func=browse

Marvin
 

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

Forum statistics

Threads
473,961
Messages
2,570,131
Members
46,689
Latest member
liammiller

Latest Threads

Top