From: 7stud -- Date: 2009-03-24T17:11:39+09:00 Subject: Re: wxRuby 2.0.0 7stud -- wrote: > Alex Fenton wrote: >> 7stud -- wrote: >> >>> was the last release before Leopard osx 10.5. Does that mean there's no >>> soup for me? >> >> I don't know for certain b/c I don't have a 10.4 machine to test on. >> >> There are specific steps taken in the build (eg ways of configuring >> wxWidgets) to provide backwards compatibility, so I hope it might work. >> If you could try it, I'd be interested in the results. >> > > I finally got around to trying this. But I can't even untar the wxRuby > gem: > > $ tar -xvf /Users/me/Desktop/wxruby-2.0.0-universal-darwin-9.gem.tar > data.tar.gz > tar: data.tar.gz: implausibly old time stamp 1969-12-31 17:00:00 > metadata.gz > tar: metadata.gz: implausibly old time stamp 1969-12-31 17:00:00 > $ Ok, there is some weirdness with osx and safari and the names of downloaded files, which I rediscovered here: http://www.ruby-forum.com/topic/141008 So I changed the filename on my Desktop to: wxruby-2.0.0-universal-darwin-9.gem (I removed the .tar extension on the end). Then I changed directories to my Desktop: $ cd ~/Desktop and then commanded: ~/Desktop$ gem install wxruby-2.0.0-universal-darwin-9.gem and I immediately got a message that said wxruby installed successfully. Wow that was fast. Ok, now to test the install. I found a basic wxruby example here: http://book.opensourceproject.org.cn/lamp/ruby/cookbook/opensource/0596523696/rubyckbk-chp-21-sect-14.html Instead of typing in the whole example, I decided to see if requiring wxruby would work first. r1test.rb ------- require 'wxruby' Nope: r1test.rb:1:in `require': No such file to load -- wxruby (LoadError) from r1test.rb:1 Oh yeah, there's some ruby gem weirdness about requires. Checking my notes in pickaxe2, I came up with this: require 'rubygems' require 'wxruby' Still didn't work: /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': No such file to load -- wxruby (LoadError) from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from r1test.rb:2 Hmm...the basic example at the link above mentions a tutorial here: http://wxruby.rubyforge.org/wiki/wiki.pl?Getting_Started Ahh, the tutorial uses: require 'wx' Nope: r1test.rb:1:in `require': No such file to load -- wx (LoadError) from r1test.rb:1 Ok, how about: require 'rubygems' require 'wx' That worked. On to the example: require 'rubygems' require 'wx' include Wx class TroutApp < App def on_init frame = Frame.new(nil, -1, "Title") text = StaticText.new(frame, -1, "You are a trout!", Point.new(-1, 1), DEFAULT_SIZE, ALIGN_CENTER) frame.show end end TroutApp.new.main_loop And that worked. So I guess you have your answer. -- Posted via http://www.ruby-forum.com/.