Ruby 2.0 on Windows 7

Can anyone give tips on how to get wxRuby working with Windows 7
(64-bit) and the Ruby 2.0 from 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

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.

On 12 April 2013 21:46, Phillip and Kerrie [email protected] wrote:

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:inrequire’
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:inrequire’
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:inrequire’
from dialogs.rb:8:in `’

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

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. [email protected] wrote:

first:
require': incompatible library version - require’

Can anyone give tips on how to get wxRuby working with Windows 7 (64-bit)
require ‘wx’
[email protected]


wxruby-users mailing
[email protected]://rubyforge.org/mailman/listinfo/wxruby-users


wxruby-users mailing list
[email protected]
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/

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

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:inrequire’
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:inrequire’
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:inrequire’
from (irb):1
from /usr/local/bin/irb:12:in `’