Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
how do you install a local gem?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="7stud --, post: 4634810"] 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 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 $ so I changed the filename on my Desktop to: wxruby-2.0.0-universal-darwin-9.gem i.e. 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: [URL]http://book.opensourceproject.org.cn/lamp/ruby/cookbook/opensource/0596523696/rubyckbk-chp-21-sect-14.html[/URL] 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: [URL]http://wxruby.rubyforge.org/wiki/wiki.pl?Getting_Started[/URL] 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. Thanks for all the help. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
how do you install a local gem?
Top