Forum: wxRuby Ruby 2.0 on Windows 7

D296be781534c9043ec914c926352f44?d=identicon&s=25 Jamal Mazrui (Guest)
on 2013-04-12 12:11
(Received via mailing list)
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
8e9ab605d7a3f93c134cc84c96a096fd?d=identicon&s=25 Phillip and Kerrie (Guest)
on 2013-04-12 13:55
(Received via mailing list)
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.
8e9ab605d7a3f93c134cc84c96a096fd?d=identicon&s=25 Phillip and Kerrie (Guest)
on 2013-04-12 13:55
(Received via mailing list)
On 12 April 2013 21:46, Phillip and Kerrie <philkez@gmail.com> wrote:
D296be781534c9043ec914c926352f44?d=identicon&s=25 Jamal Mazrui (Guest)
on 2013-04-12 14:45
(Received via mailing list)
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 `<main>'
D296be781534c9043ec914c926352f44?d=identicon&s=25 Jamal Mazrui (Guest)
on 2013-04-15 13:05
(Received via mailing list)
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
3396e4a3df8a840faec520af8555a400?d=identicon&s=25 Mario Steele (Guest)
on 2013-04-15 21:13
(Received via mailing list)
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 Mazrui <empower@smart.net> wrote:

>
> first:
> `require': incompatible library version -
> `require'
>
>> Can anyone give tips on how to get wxRuby working with Windows 7 (64-bit)
>> require 'wx'
>> wxruby-users@rubyforge.org
>
> _______________________________________________
> wxruby-users mailing
listwxruby-users@rubyforge.orghttp://rubyforge.org/mailman/listinfo/wxruby-users
>
>
>
> _______________________________________________
> wxruby-users mailing list
> wxruby-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/wxruby-users
>



--
Mario Steele
Fleet Captain
CO - Geo 99
CO - USS T'hy'la
XO - Diplomatic Corps - Second Life
http://www.iftcommand.com/chapters/thyla/
http://www.trekfederation.com
01a68e65c05c8751d75dbf957ea4fa23?d=identicon&s=25 Zhimin Zhan (zzhan)
on 2013-04-20 00:12
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
Bd3bd3b71731fba939aa1da5a78f9586?d=identicon&s=25 James Rinkevich (rinkevichjm)
on 2013-04-21 04:26
Mario Steele 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 `<main>'
This topic is locked and can not be replied to.