# Wxruby problem

**URL:** <https://www.ruby-forum.com/t/wxruby-problem/172904>\
**Category:** Ruby\
**Created:** [July 29, 2009, 6:41pm UTC](https://www.ruby-forum.com/t/wxruby-problem/172904 "2009-07-29T18:41:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rainer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58956e/32.png) [@rainer](https://www.ruby-forum.com/u/rainer)\
**Post date:** [July 29, 2009, 6:41pm UTC](https://www.ruby-forum.com/t/wxruby-problem/172904/1 "2009-07-29T18:41:08Z")

</div>

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 :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 `’

[NOTE]  
You may encounter a bug of Ruby interpreter. Bug reports are welcome.  
For details: [http://www.ruby-lang.org/bugreport.html](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 [Downloads - wxWidgets](http://wxwidgets.org/downloads/) with the Windows Installer  
wxMSW). Again, no cigar.

Does anybody know what’s going on here?

Kind regards,

Rainer

---

<div class="post-metadata">

**Author:** ![rainer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58956e/32.png) [@rainer](https://www.ruby-forum.com/u/rainer)\
**Post date:** [July 29, 2009, 7:26pm UTC](https://www.ruby-forum.com/t/wxruby-problem/172904/2 "2009-07-29T19:26:07Z")

</div>

Rainer wrote:

> I typed “gem install wxruby”

Hi Rainer,

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

Marvin

---

<div class="post-metadata">

**Author:** ![rainer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58956e/32.png) [@rainer](https://www.ruby-forum.com/u/rainer)\
**Post date:** [July 29, 2009, 9:25pm UTC](https://www.ruby-forum.com/t/wxruby-problem/172904/3 "2009-07-29T21:25:38Z")

</div>

On 29 Jul., 19:26, Marvin Gülker [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Posted viahttp://www.ruby-forum.com/.  
> 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?

---

<div class="post-metadata">

**Author:** ![rainer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58956e/32.png) [@rainer](https://www.ruby-forum.com/u/rainer)\
**Post date:** [July 30, 2009, 11:16am UTC](https://www.ruby-forum.com/t/wxruby-problem/172904/4 "2009-07-30T11:16:26Z")

</div>

Rainer wrote:

> On 29 Jul., 19:26, Marvin Gï¿½lker [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:  
> 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  
[Unable to use wxruby-ruby19 in Ruby 1.9.1-p129 on Windows - wxRuby - Ruby-Forum](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).

Rainer wrote:

> 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](http://ruby-forum.com) and  
> everything you post to the mailing list is visible to the people on  
> [ruby-forum.com](http://ruby-forum.com). The same goes the other way round.

Marvin

---

<div class="post-metadata">

**Author:** ![rainer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58956e/32.png) [@rainer](https://www.ruby-forum.com/u/rainer)\
**Post date:** [July 30, 2009, 11:21am UTC](https://www.ruby-forum.com/t/wxruby-problem/172904/5 "2009-07-30T11:21:45Z")

</div>

Marvin GÃ¼lker wrote:

> Are you using the mswin32 version of WxRuby? I run into problems  
> Sorry, I meant Ruby, not WxRuby. 🙂

Marvin

---

<div class="post-metadata">

**Author:** ![rainer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58956e/32.png) [@rainer](https://www.ruby-forum.com/u/rainer)\
**Post date:** [July 30, 2009, 1:40pm UTC](https://www.ruby-forum.com/t/wxruby-problem/172904/6 "2009-07-30T13:40:52Z")

</div>

On 30 Jul., 11:21, Marvin Gülker [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Marvin Gülker wrote:
> 
> > Are you using the mswin32 version of WxRuby? I run into problems
> 
> Sorry, I meant Ruby, not WxRuby. 🙂
> 
> ## Marvin
> 
> Posted viahttp://www.ruby-forum.com/.

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 `’  
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 `’  
—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

---

<div class="post-metadata">

**Author:** ![rainer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58956e/32.png) [@rainer](https://www.ruby-forum.com/u/rainer)\
**Post date:** [July 30, 2009, 5:15pm UTC](https://www.ruby-forum.com/t/wxruby-problem/172904/7 "2009-07-30T17:15:45Z")

</div>

Hello Marvin,

somehow, my last message was lost. Anyway, I filed a bug:

[http://rubyforge.org/tracker/index.php?func=detail&aid=26801&group\_id=126&atid=575](http://rubyforge.org/tracker/index.php?func=detail&aid=26801&group_id=126&atid=575)

Cheers,

Rainer

---

<div class="post-metadata">

**Author:** ![rainer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58956e/32.png) [@rainer](https://www.ruby-forum.com/u/rainer)\
**Post date:** [July 30, 2009, 3:13pm UTC](https://www.ruby-forum.com/t/wxruby-problem/172904/8 "2009-07-30T15:13:28Z")

</div>

Rainer wrote:

> 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 `’  
> 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 `’  
> —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.

Rainer wrote:

> 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](http://rubyforge.org/tracker/?atid=575&group_id=126&func=browse)

Marvin
