From: 7stud -- Date: 2009-03-28T07:08:33+09:00 Subject: Re: I just can't get rubygems to work. Can anyone help? Todd Benson wrote: > On Fri, Mar 27, 2009 at 2:48 PM, 7stud -- > wrote: >>>> >> >> Well, Mario said that would "probably" work, so I thought I would see if >> anyone could confirm that or not. The thread you linked to says to use >> rm -rf, but I'm not sure what path/file I should list, and I checked the >> man pages on rm, and that sounds a bit dangerous. If I do: >> >> $ rm -rf /Users/me/.gem >> >> will that delete /Users/me and /Users ? Or will it only delete a >> directory if it is empty? > > On my system, no. Do a test... > > mkdir temp > cd temp > mkdir .gem > cd .gem > touch a b > cd ../.. > rm -rf temp/.gem > > ls temp #nothing, but temp is still there. Ok. I did $ rm -r ~/.gem so that rm would ask me to confirm the files it was going to delete. After awhile, I did a ctrl+C to stop the command. Then I did $ rm -rf ~/.gem which deleted the .gem directory and all the files and directories beneath the .gem directory. Then I did: $ gem env RubyGems Environment: - RUBYGEMS VERSION: 1.3.1 - RUBY VERSION: 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.11.1] - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8 - RUBY EXECUTABLE: /usr/local/bin/ruby - EXECUTABLE DIRECTORY: /usr/local/bin - RUBYGEMS PLATFORMS: - ruby - x86-darwin-8 - GEM PATHS: - /usr/local/lib/ruby/gems/1.8 - /Users/me/.gem/ruby/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://gems.rubyforge.org/ Unfortunately, ~/.gem is still listed as a gem path--I suspected it would be. Then I dragged the gem wxruby-2.0.0-universal-darwin-9.gem onto my Desktop then I did: $ cd ~/Desktop $ sudo gem install wxruby-2.0.0-universal-darwin-9.gem No error messages. $ gem list --local *** LOCAL GEMS *** fastercsv (1.2.3) hoe (1.5.0) hpricot (0.6) libxml-ruby (0.5.2.0) mechanize (0.7.0) rake (0.8.1) rubyforge (0.4.4) rubygems-update (1.0.1) wxruby (2.0.0) There's the wxruby gem. Then I tried running a simple wxruby program with the following lines at the top: require "rubygems" require "wx" and it worked. Miracle. $ which ruby /usr/local/bin/ruby $ ruby -v ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.11.1] So I guess I'm setup--finally. I hope having two gem paths doesn't come back and bite me. Thanks everyone. -- Posted via http://www.ruby-forum.com/.