Friday, November 5, 2010

Installing wxRuby

1. Installation of wxRuby

$ sudo gem install wxruby
Successfully installed wxruby-2.0.1-x86-linux
1 gem installed
Installing ri documentation for wxruby-2.0.1-x86-linux...
Installing RDoc documentation for wxruby-2.0.1-x86-linux...
$ sudo gem1.9.1 install wxruby
Successfully installed wxruby-2.0.1-x86-linux
1 gem installed
Installing ri documentation for wxruby-2.0.1-x86-linux...
Installing RDoc documentation for wxruby-2.0.1-x86-linux...
socrateos@ubuntu-pc:~$ 

2. A Barebone App
$ irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'wx'
=> true
irb(main):003:0> include Wx
=> Object
irb(main):004:0> class MyApp < App
irb(main):005:1> def on_init
irb(main):006:2> Frame.new(nil, -1, "Test").show()
irb(main):007:2> end
irb(main):008:1> end
=> nil
irb(main):009:0> MyApp.new.main_loop





3. wxRuby fails to run with Ruby 1.9.1 in Ubuntu
$ irb1.9.1 
irb(main):001:0> require 'wx'
/var/lib/gems/1.9.1/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so: [BUG] unknown type 0x22 (0xc given)
ruby 1.9.1p378 (2010-01-10 revision 26273) [i486-linux]

-- control frame ----------
c:0028 p:-38277670 s:0097 b:0097 l:000096 d:000096 TOP   
c:0027 p:---- s:0095 b:0095 l:000094 d:000094 CFUNC  :require
c:0026 p:0011 s:0091 b:0091 l:000090 d:000090 TOP    /var/lib/gems/1.9.1/gems/wxruby-2.0.1-x86-linux/lib/wx.rb:12
c:0025 p:---- s:0088 b:0088 l:000087 d:000087 FINISH
c:0024 p:---- s:0086 b:0086 l:000085 d:000085 CFUNC  :require
c:0023 p:0011 s:0082 b:0082 l:001204 d:000081 EVAL   (irb):1
c:0022 p:---- s:0080 b:0080 l:000079 d:000079 FINISH
c:0021 p:---- s:0078 b:0078 l:000077 d:000077 CFUNC  :eval
c:0020 p:0027 s:0071 b:0071 l:000070 d:000070 METHOD /usr/lib/ruby/1.9.1/irb/workspace.rb:80
c:0019 p:0031 s:0064 b:0063 l:000062 d:000062 METHOD /usr/lib/ruby/1.9.1/irb/context.rb:218
c:0018 p:0030 s:0058 b:0058 l:001bb4 d:000057 BLOCK  /usr/lib/ruby/1.9.1/irb.rb:157
c:0017 p:0039 s:0050 b:0050 l:000049 d:000049 METHOD /usr/lib/ruby/1.9.1/irb.rb:271
c:0016 p:0011 s:0045 b:0045 l:001bb4 d:000044 BLOCK  /usr/lib/ruby/1.9.1/irb.rb:154
c:0015 p:0132 s:0041 b:0041 l:000024 d:000040 BLOCK  /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:244
c:0014 p:---- s:0038 b:0038 l:000037 d:000037 FINISH
c:0013 p:---- s:0036 b:0036 l:000035 d:000035 CFUNC  :loop
c:0012 p:0009 s:0033 b:0033 l:000024 d:000032 BLOCK  /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:230
c:0011 p:---- s:0031 b:0031 l:000030 d:000030 FINISH
c:0010 p:---- s:0029 b:0029 l:000028 d:000028 CFUNC  :catch
c:0009 p:0023 s:0025 b:0025 l:000024 d:000024 METHOD /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:229
c:0008 p:0042 s:0022 b:0022 l:001bb4 d:001bb4 METHOD /usr/lib/ruby/1.9.1/irb.rb:153
c:0007 p:0011 s:0019 b:0019 l:00059c d:000018 BLOCK  /usr/lib/ruby/1.9.1/irb.rb:70
c:0006 p:---- s:0017 b:0017 l:000016 d:000016 FINISH
c:0005 p:---- s:0015 b:0015 l:000014 d:000014 CFUNC  :catch
c:0004 p:0174 s:0011 b:0011 l:00059c d:00059c METHOD /usr/lib/ruby/1.9.1/irb.rb:69
c:0003 p:0039 s:0006 b:0006 l:000a94 d:000784 EVAL   /usr/bin/irb1.9.1:12
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000a94 d:000a94 TOP   
---------------------------
-- Ruby level backtrace information-----------------------------------------
/var/lib/gems/1.9.1/gems/wxruby-2.0.1-x86-linux/lib/wx.rb:12:in `require'
/var/lib/gems/1.9.1/gems/wxruby-2.0.1-x86-linux/lib/wx.rb:12:in `'
(irb):1:in `require'
(irb):1:in `irb_binding'
/usr/lib/ruby/1.9.1/irb/workspace.rb:80:in `eval'
/usr/lib/ruby/1.9.1/irb/workspace.rb:80:in `evaluate'
/usr/lib/ruby/1.9.1/irb/context.rb:218:in `evaluate'
/usr/lib/ruby/1.9.1/irb.rb:157:in `block (2 levels) in eval_input'
/usr/lib/ruby/1.9.1/irb.rb:271:in `signal_status'
/usr/lib/ruby/1.9.1/irb.rb:154:in `block in eval_input'
/usr/lib/ruby/1.9.1/irb/ruby-lex.rb:244:in `block (2 levels) in each_top_level_statement'
/usr/lib/ruby/1.9.1/irb/ruby-lex.rb:230:in `loop'
/usr/lib/ruby/1.9.1/irb/ruby-lex.rb:230:in `block in each_top_level_statement'
/usr/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `catch'
/usr/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `each_top_level_statement'
/usr/lib/ruby/1.9.1/irb.rb:153:in `eval_input'
/usr/lib/ruby/1.9.1/irb.rb:70:in `block in start'
/usr/lib/ruby/1.9.1/irb.rb:69:in `catch'
/usr/lib/ruby/1.9.1/irb.rb:69:in `start'
/usr/bin/irb1.9.1:12:in `
' -- C level backtrace information ------------------------------------------- 0xb777c929 /usr/lib/libruby-1.9.1.so.1.9(rb_vm_bugreport+0x69) [0xb777c929] 0xb769592f /usr/lib/libruby-1.9.1.so.1.9(+0x4692f) [0xb769592f] 0xb76959ca /usr/lib/libruby-1.9.1.so.1.9(rb_bug+0x3a) [0xb76959ca] 0xb7695f0c /usr/lib/libruby-1.9.1.so.1.9(rb_check_type+0xbc) [0xb7695f0c] 0xb6d41cdc /var/lib/gems/1.9.1/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so(Init_wxAboutDialogInfo+0x8c) [0xb6d41cdc] 0xb71791fb /var/lib/gems/1.9.1/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so(InitializeOtherModules+0xb) [0xb71791fb] 0xb717a109 /var/lib/gems/1.9.1/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so(Init_wxruby2+0x339) [0xb717a109] 0xb766c22a /usr/lib/libruby-1.9.1.so.1.9(dln_load+0x10a) [0xb766c22a] 0xb7699ae8 /usr/lib/libruby-1.9.1.so.1.9(+0x4aae8) [0xb7699ae8] 0xb77684ef /usr/lib/libruby-1.9.1.so.1.9(rb_vm_call_cfunc+0xaf) [0xb77684ef] 0xb769aad7 /usr/lib/libruby-1.9.1.so.1.9(rb_require_safe+0x5d7) [0xb769aad7] 0xb769ae06 /usr/lib/libruby-1.9.1.so.1.9(rb_f_require+0x26) [0xb769ae06] 0xb7769af3 /usr/lib/libruby-1.9.1.so.1.9(+0x11aaf3) [0xb7769af3] 0xb7769e84 /usr/lib/libruby-1.9.1.so.1.9(+0x11ae84) [0xb7769e84] 0xb777617c /usr/lib/libruby-1.9.1.so.1.9(+0x12717c) [0xb777617c] 0xb7770673 /usr/lib/libruby-1.9.1.so.1.9(+0x121673) [0xb7770673] 0xb7773b46 /usr/lib/libruby-1.9.1.so.1.9(+0x124b46) [0xb7773b46] 0xb7773f0a /usr/lib/libruby-1.9.1.so.1.9(rb_iseq_eval+0x12a) [0xb7773f0a] 0xb7699c8d /usr/lib/libruby-1.9.1.so.1.9(rb_load+0x18d) [0xb7699c8d] 0xb769ab18 /usr/lib/libruby-1.9.1.so.1.9(rb_require_safe+0x618) [0xb769ab18] 0xb769ae06 /usr/lib/libruby-1.9.1.so.1.9(rb_f_require+0x26) [0xb769ae06] 0xb7769af3 /usr/lib/libruby-1.9.1.so.1.9(+0x11aaf3) [0xb7769af3] 0xb7769e84 /usr/lib/libruby-1.9.1.so.1.9(+0x11ae84) [0xb7769e84] 0xb777617c /usr/lib/libruby-1.9.1.so.1.9(+0x12717c) [0xb777617c] 0xb7770673 /usr/lib/libruby-1.9.1.so.1.9(+0x121673) [0xb7770673] 0xb7773b46 /usr/lib/libruby-1.9.1.so.1.9(+0x124b46) [0xb7773b46] 0xb7774b1f /usr/lib/libruby-1.9.1.so.1.9(+0x125b1f) [0xb7774b1f] 0xb777514c /usr/lib/libruby-1.9.1.so.1.9(rb_f_eval+0xdc) [0xb777514c] 0xb7769b18 /usr/lib/libruby-1.9.1.so.1.9(+0x11ab18) [0xb7769b18] 0xb7769e84 /usr/lib/libruby-1.9.1.so.1.9(+0x11ae84) [0xb7769e84] 0xb777617c /usr/lib/libruby-1.9.1.so.1.9(+0x12717c) [0xb777617c] 0xb7770673 /usr/lib/libruby-1.9.1.so.1.9(+0x121673) [0xb7770673] 0xb7773b46 /usr/lib/libruby-1.9.1.so.1.9(+0x124b46) [0xb7773b46] 0xb7775640 /usr/lib/libruby-1.9.1.so.1.9(+0x126640) [0xb7775640] 0xb7697379 /usr/lib/libruby-1.9.1.so.1.9(rb_rescue2+0x169) [0xb7697379] 0xb776b70c /usr/lib/libruby-1.9.1.so.1.9(+0x11c70c) [0xb776b70c] 0xb7769afd /usr/lib/libruby-1.9.1.so.1.9(+0x11aafd) [0xb7769afd] 0xb7769e84 /usr/lib/libruby-1.9.1.so.1.9(+0x11ae84) [0xb7769e84] 0xb777617c /usr/lib/libruby-1.9.1.so.1.9(+0x12717c) [0xb777617c] 0xb7770673 /usr/lib/libruby-1.9.1.so.1.9(+0x121673) [0xb7770673] 0xb7773b46 /usr/lib/libruby-1.9.1.so.1.9(+0x124b46) [0xb7773b46] 0xb7774146 /usr/lib/libruby-1.9.1.so.1.9(+0x125146) [0xb7774146] 0xb7774912 /usr/lib/libruby-1.9.1.so.1.9(+0x125912) [0xb7774912] 0xb7769b18 /usr/lib/libruby-1.9.1.so.1.9(+0x11ab18) [0xb7769b18] 0xb7769e84 /usr/lib/libruby-1.9.1.so.1.9(+0x11ae84) [0xb7769e84] 0xb777617c /usr/lib/libruby-1.9.1.so.1.9(+0x12717c) [0xb777617c] 0xb7770673 /usr/lib/libruby-1.9.1.so.1.9(+0x121673) [0xb7770673] 0xb7773b46 /usr/lib/libruby-1.9.1.so.1.9(+0x124b46) [0xb7773b46] 0xb7774146 /usr/lib/libruby-1.9.1.so.1.9(+0x125146) [0xb7774146] 0xb7774912 /usr/lib/libruby-1.9.1.so.1.9(+0x125912) [0xb7774912] 0xb7769b18 /usr/lib/libruby-1.9.1.so.1.9(+0x11ab18) [0xb7769b18] 0xb7769e84 /usr/lib/libruby-1.9.1.so.1.9(+0x11ae84) [0xb7769e84] 0xb777617c /usr/lib/libruby-1.9.1.so.1.9(+0x12717c) [0xb777617c] 0xb7770673 /usr/lib/libruby-1.9.1.so.1.9(+0x121673) [0xb7770673] 0xb7773b46 /usr/lib/libruby-1.9.1.so.1.9(+0x124b46) [0xb7773b46] 0xb7773dbb /usr/lib/libruby-1.9.1.so.1.9(rb_iseq_eval_main+0xab) [0xb7773dbb] 0xb7697c77 /usr/lib/libruby-1.9.1.so.1.9(ruby_exec_node+0xb7) [0xb7697c77] 0xb7699276 /usr/lib/libruby-1.9.1.so.1.9(ruby_run_node+0x56) [0xb7699276] 0x80487c8 irb1.9.1(main+0x68) [0x80487c8] 0xb748cbd6 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0xb748cbd6] 0x80486c1 irb1.9.1() [0x80486c1] [NOTE] You may encounter a bug of Ruby interpreter. Bug reports are welcome. For details: http://www.ruby-lang.org/bugreport.html Aborted

No comments:

Post a Comment