Joshua B. wrote:
7stud – wrote:
Stefano C. wrote:
This seems even more strange. The file wxruby-1.9.4.tar.gz is not the
version, so, even if the file was automatically unzipped, it should be
If you want to use rubygems, you should download this file:
gem install wxruby-1.9.4-universal-darwin.gem
Whoops. I went to this page:
and I downloaded:
That hit my Desktop as:
and then I had the problems outlined in my first post.
I recall an article on this recently (I believe from the Apple Developer
Connection). Apparently, due to some form of server oddness, Safari
seems to tack on spurious .tar and .gz extensions. You should be able to
simple rename the file, removing the .tar, and install as normal.
I finally got around to messing with this install again, and this time I
was able to successfully install wxruby thanks to the advice given here.
I installed the latest wxruby 2.0 instead of the version mentioned in my
earlier posts. I successfully installed the wxruby 2.0 gem which says
it’s for darwin-9 even though my system is darwin-8:
$ ruby -v
ruby 1.8.2 (2004-12-25) [universal-darwin8.0]
I got this error trying to install:
$ tar -xvf /Users/me/Desktop/wxruby-2.0.0-universal-darwin-9.gem.tar
tar: data.tar.gz: implausibly old time stamp 1969-12-31 17:00:00
tar: metadata.gz: implausibly old time stamp 1969-12-31 17:00:00
so I changed the filename on my Desktop to:
i.e. I removed the .tar extension on the end. Then I changed
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:
Instead of typing in the whole example, I decided to see if requiring
wxruby would work first.
r1test.rb:1:in `require’: No such file to load – wxruby (LoadError)
Oh yeah, there’s some ruby gem weirdness about requires. Checking my
notes in pickaxe2, I came up with this:
Still didn’t work:
gem_original_require': No such file to load -- wxruby (LoadError) from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
Hmm…the basic example at the link above mentions a tutorial here:
Ahh, the tutorial uses:
r1test.rb:1:in `require’: No such file to load – wx (LoadError)
Ok, how about:
That worked. On to the example:
class TroutApp < App
frame = Frame.new(nil, -1, “Title”)
text = StaticText.new(frame, -1, “You are a trout!”,
Point.new(-1, 1), DEFAULT_SIZE, ALIGN_CENTER)
And that worked.
Thanks for all the help.