# Ruby 2.0 on Windows 7

**URL:** <https://www.ruby-forum.com/t/ruby-2-0-on-windows-7/228170>\
**Category:** wxRuby\
**Created:** [April 12, 2013, 12:11pm UTC](https://www.ruby-forum.com/t/ruby-2-0-on-windows-7/228170 "2013-04-12T12:11:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamal86](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ebca7d/32.png) [@jamal86](https://www.ruby-forum.com/u/jamal86)\
**Post date:** [April 12, 2013, 12:11pm UTC](https://www.ruby-forum.com/t/ruby-2-0-on-windows-7/228170/1 "2013-04-12T12:11:04Z")

</div>

Can anyone give tips on how to get wxRuby working with Windows 7  
(64-bit) and the Ruby 2.0 from [RubyInstaller.org](http://RubyInstaller.org)?

I installed wxRuby with the following command:

gem install wxruby-ruby19

No errors were reported during installation. Any sample program fails,  
however, on the following line:

require ‘wx’

I cannot figure out the cause of the load error, though think it may be  
when the require method is trying to load the DLL (if memory serves,  
that file name is wxruby2.so).

Jamal

---

<div class="post-metadata">

**Author:** ![jamal86](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ebca7d/32.png) [@jamal86](https://www.ruby-forum.com/u/jamal86)\
**Post date:** [April 12, 2013, 1:55pm UTC](https://www.ruby-forum.com/t/ruby-2-0-on-windows-7/228170/2 "2013-04-12T13:55:04Z")

</div>

I have not tried installing wx myself but from the ruby installer  
documentation you will need to use the following line

gem install wxruby-ruby19 --platform=ruby

after installing the dev kit.

---

<div class="post-metadata">

**Author:** ![jamal86](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ebca7d/32.png) [@jamal86](https://www.ruby-forum.com/u/jamal86)\
**Post date:** [April 12, 2013, 1:55pm UTC](https://www.ruby-forum.com/t/ruby-2-0-on-windows-7/228170/3 "2013-04-12T13:55:40Z")

</div>

On 12 April 2013 21:46, Phillip and Kerrie [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

---

<div class="post-metadata">

**Author:** ![jamal86](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ebca7d/32.png) [@jamal86](https://www.ruby-forum.com/u/jamal86)\
**Post date:** [April 12, 2013, 2:45pm UTC](https://www.ruby-forum.com/t/ruby-2-0-on-windows-7/228170/4 "2013-04-12T14:45:55Z")

</div>

Thanks for the response.

Strangely, the gem command with the ruby platform parameter does not  
work for me. I get the following error:

ERROR: While executing gem … (ArgumentError)  
malformed format string - %)

To ensure I had the latest gem manager, I did do the following command  
first:

gem update --system

The wxRuby gem was the first gem I tried to install after a fresh  
installation of 32-bit Ruby 2.0. I then tried again without the Ruby  
platform parameter, and the gem seemed to install successfully.  
However, when I try to run the dialogs.rb sample, I get the following  
error:

c:/ruby200/lib/ruby/site\_ruby/2.0.0/rubygems/core\_ext/kernel\_require.rb:45:in  
`require': incompatible library version - c:/ruby200/lib/ruby/gems/2.0.0/gems/wxruby-ruby19-2.0.1-x86-mingw32/lib/wxruby2.so (LoadError) from c:/ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in`require’  
from  
c:/ruby200/lib/ruby/gems/2.0.0/gems/wxruby-ruby19-2.0.1-x86-mingw32/lib/wx.rb:12:in  
`<top (required)>' from c:/ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in`require’  
from  
c:/ruby200/lib/ruby/site\_ruby/2.0.0/rubygems/core\_ext/kernel\_require.rb:110:in  
`rescue in require' from c:/ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in`require’  
from dialogs.rb:8:in `’

---

<div class="post-metadata">

**Author:** ![jamal86](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ebca7d/32.png) [@jamal86](https://www.ruby-forum.com/u/jamal86)\
**Post date:** [April 15, 2013, 1:05pm UTC](https://www.ruby-forum.com/t/ruby-2-0-on-windows-7/228170/5 "2013-04-15T13:05:57Z")

</div>

I verified that wxRuby does work with Ruby 1.93, so an incompatibility  
seems to have been introduced with Ruby 2.0. It may be as simple as a  
version number conflict or unexpected encoding, but I have not been able  
to resolve this. Any help would be appreciated in getting Ruby 2.0,  
wxRuby, and Windows 7 to work together.

Jamal

---

<div class="post-metadata">

**Author:** ![jamal86](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ebca7d/32.png) [@jamal86](https://www.ruby-forum.com/u/jamal86)\
**Post date:** [April 15, 2013, 9:13pm UTC](https://www.ruby-forum.com/t/ruby-2-0-on-windows-7/228170/6 "2013-04-15T21:13:49Z")

</div>

After testing on Linux, I found an incompatability with wxRuby’s binary  
gem, and Ruby 1.9.3 p392. I will be looking into creating a 2.0  
Compatible  
Gem for Windows, and Linux systems here shortly, and see about pushing  
the  
gem to RubyForge.

On Mon, Apr 15, 2013 at 7:04 AM, Jamal M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> first:  
> `require': incompatible library version - `require’
> 
> > Can anyone give tips on how to get wxRuby working with Windows 7 (64-bit)  
> > require ‘wx’  
> > [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
> 
> * * *
> 
> wxruby-users mailing  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)://rubyforge.org/mailman/listinfo/wxruby-users
> 
> * * *
> 
> wxruby-users mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [http://rubyforge.org/mailman/listinfo/wxruby-users](http://rubyforge.org/mailman/listinfo/wxruby-users)

–  
Mario S.  
Fleet Captain  
CO - Geo 99  
CO - USS T’hy’la  
XO - Diplomatic Corps - Second Life  
[http://www.iftcommand.com/chapters/thyla/](http://www.iftcommand.com/chapters/thyla/)

> **[HOME | The Federation](https://www.trekfederation.com)**

---

<div class="post-metadata">

**Author:** ![jamal86](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ebca7d/32.png) [@jamal86](https://www.ruby-forum.com/u/jamal86)\
**Post date:** [April 20, 2013, 12:12am UTC](https://www.ruby-forum.com/t/ruby-2-0-on-windows-7/228170/7 "2013-04-20T00:12:38Z")

</div>

Hi Mario,

> I will be looking into creating a 2.0 Compatible Gem for Windows, and Linux  
> systems here shortly, and see about pushing the gem to RubyForge.

That will be wonderful!  
Thanks in advance.

Regards,  
Zhimin

---

<div class="post-metadata">

**Author:** ![jamal86](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ebca7d/32.png) [@jamal86](https://www.ruby-forum.com/u/jamal86)\
**Post date:** [April 21, 2013, 4:26am UTC](https://www.ruby-forum.com/t/ruby-2-0-on-windows-7/228170/8 "2013-04-21T04:26:04Z")

</div>

Mario S. wrote in post #1105738:

> After testing on Linux, I found an incompatability with wxRuby’s binary  
> gem, and Ruby 1.9.3 p392. I will be looking into creating a 2.0  
> Compatible  
> Gem for Windows, and Linux systems here shortly, and see about pushing  
> the  
> gem to RubyForge.

same problem exists on OS X too.  
ERROR: While executing gem … (Errno::EACCES)  
Permission denied -  
/usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/gems/2.0.0/gems/wxruby-ruby19-2.0.1-x86-darwin-9/lib/wx/accessors.rb  
localhost:~ jamesrinkevich$ sudo gem install wxruby-ruby19  
Password:  
Successfully installed wxruby-ruby19-2.0.1-x86-darwin-9  
Parsing documentation for wxruby-ruby19-2.0.1-x86-darwin-9  
unable to convert “\xCA” from ASCII-8BIT to UTF-8 for  
lib/wxruby2.bundle, skipping  
Done installing documentation for wxruby-ruby19 (4 sec).  
1 gem installed  
localhost:~ jamesrinkevich$ irb  
irb(main):001:0\> require ‘wx’  
LoadError:  
dlopen(/usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/gems/2.0.0/gems/wxruby-ruby19-2.0.1-x86-darwin-9/lib/wxruby2.bundle,  
9): no suitable image found. Did find:  
/usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/gems/2.0.0/gems/wxruby-ruby19-2.0.1-x86-darwin-9/lib/wxruby2.bundle:  
no matching architecture in universal wrapper -  
/usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/gems/2.0.0/gems/wxruby-ruby19-2.0.1-x86-darwin-9/lib/wxruby2.bundle  
from  
/usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/2.0.0/rubygems/core\_ext/kernel\_require.rb:45:in  
`require' from /usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require’  
from  
/usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/gems/2.0.0/gems/wxruby-ruby19-2.0.1-x86-darwin-9/lib/wx.rb:12:in  
`<top (required)>' from /usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `require’  
from  
/usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/2.0.0/rubygems/core\_ext/kernel\_require.rb:110:in  
`rescue in require' from /usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in `require’  
from (irb):1  
from /usr/local/bin/irb:12:in `’
