# I just can't get rubygems to work. Can anyone help?

**URL:** <https://www.ruby-forum.com/t/i-just-cant-get-rubygems-to-work-can-anyone-help/164084>\
**Category:** Ruby\
**Created:** [March 27, 2009, 6:05pm UTC](https://www.ruby-forum.com/t/i-just-cant-get-rubygems-to-work-can-anyone-help/164084 "2009-03-27T18:05:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![7stud](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/7/57b2e6/32.png) [@7stud](https://www.ruby-forum.com/u/7stud)\
**Post date:** [March 27, 2009, 6:05pm UTC](https://www.ruby-forum.com/t/i-just-cant-get-rubygems-to-work-can-anyone-help/164084/1 "2009-03-27T18:05:48Z")

</div>

My problems started with a wxruby gem, but the whole gem system on my  
mac is now one big cluster#$#$!. rubygems .9x was giving me problems–I  
have a pre-installed ruby 1.8.2 on my mac–so I tried to upgrade to  
rubygems 1.3.1 with the “rubygems 1.3.1 update”, which is supposed to be  
an easy thing to do, but that didn’t work for me either.

Next, I decided to upgrade to ruby 1.8.6, and download the full rubygems  
1.3.1 and install it locally hoping that all my problems would be  
solved. No such luck. I originally posted about the problems I am  
having in the wxruby forum here:

[http://www.ruby-forum.com/topic/182480#new](http://www.ruby-forum.com/topic/182480#new)

because I was trying to get a wxruby gem to work. But my problem is  
really a general gem problem, so I think it is more appropriate to get  
help here, and hopefully more people will see my post.

I am fully willing to wipe every trace of every version of rubygems off  
my computer and start anew if that would be easier and I could get  
instructions on how to do that.

For the full story, I please read the post at the link above.

Thanks for any help.

---

<div class="post-metadata">

**Author:** ![7stud](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/7/57b2e6/32.png) [@7stud](https://www.ruby-forum.com/u/7stud)\
**Post date:** [March 27, 2009, 7:32pm UTC](https://www.ruby-forum.com/t/i-just-cant-get-rubygems-to-work-can-anyone-help/164084/2 "2009-03-27T19:32:35Z")

</div>

On Fri, Mar 27, 2009 at 10:32 PM, 7stud – [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> My problems started with a wxruby gem, but the whole gem system on my  
> mac is now one big cluster#$#$!.  
> […]  
> Next, I decided to upgrade to ruby 1.8.6, and download the full rubygems  
> 1.3.1 and install it locally hoping that all my problems would be  
> solved. No such luck. I originally posted about the problems I am  
> having in the wxruby forum here:
> 
> [I updated ruby and rubygems and now no more wxruby - wxRuby - Ruby-Forum](http://www.ruby-forum.com/topic/182480#new)

Hi, you may find this thread helpful:  
[http://www.ruby-forum.com/topic/180436](http://www.ruby-forum.com/topic/180436)

In your original thread, Mario suggested cleanuping up anything  
accidentally installed in /Users/autie/.gem  
Did that not help?

solidarity,  
lasitha.

---

<div class="post-metadata">

**Author:** ![7stud](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/7/57b2e6/32.png) [@7stud](https://www.ruby-forum.com/u/7stud)\
**Post date:** [March 27, 2009, 8:51pm UTC](https://www.ruby-forum.com/t/i-just-cant-get-rubygems-to-work-can-anyone-help/164084/3 "2009-03-27T20:51:37Z")

</div>

lasitha wrote:

> On Fri, Mar 27, 2009 at 10:32 PM, 7stud – [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > My problems started with a wxruby gem, but the whole gem system on my  
> > mac is now one big cluster#$#$!.  
> > […]  
> > Next, I decided to upgrade to ruby 1.8.6, and download the full rubygems  
> > 1.3.1 and install it locally hoping that all my problems would be  
> > solved. ï¿½No such luck. ï¿½I originally posted about the problems I am  
> > having in the wxruby forum here:
> > 
> > [I updated ruby and rubygems and now no more wxruby - wxRuby - Ruby-Forum](http://www.ruby-forum.com/topic/182480#new)
> 
> Hi, you may find this thread helpful:  
> [Gem cleanup problem - Ruby - Ruby-Forum](http://www.ruby-forum.com/topic/180436)
> 
> In your original thread, Mario suggested cleanuping up anything  
> accidentally installed in /Users/me/.gem  
> Did that not help?

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?

---

<div class="post-metadata">

**Author:** ![7stud](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/7/57b2e6/32.png) [@7stud](https://www.ruby-forum.com/u/7stud)\
**Post date:** [March 27, 2009, 10:08pm UTC](https://www.ruby-forum.com/t/i-just-cant-get-rubygems-to-work-can-anyone-help/164084/4 "2009-03-27T22:08:02Z")

</div>

On Fri, Mar 27, 2009 at 2:48 PM, 7stud – [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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.

hth,  
Todd

---

<div class="post-metadata">

**Author:** ![7stud](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/7/57b2e6/32.png) [@7stud](https://www.ruby-forum.com/u/7stud)\
**Post date:** [March 27, 2009, 11:11pm UTC](https://www.ruby-forum.com/t/i-just-cant-get-rubygems-to-work-can-anyone-help/164084/5 "2009-03-27T23:11:53Z")

</div>

Todd B. wrote:

> On Fri, Mar 27, 2009 at 2:48 PM, 7stud – [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> 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/](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.
