Forum: Ruby I just can't get rubygems to work. Can anyone help?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7stud -. (Guest)
on 2009-03-27 19:05
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

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.
lasitha (Guest)
on 2009-03-27 20:32
(Received via mailing list)
On Fri, Mar 27, 2009 at 10:32 PM, 7stud -- 
<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:
>
> http://www.ruby-forum.com/topic/182480#new
>

Hi, you may find this thread helpful:
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.
7stud -. (Guest)
on 2009-03-27 21:51
lasitha wrote:
> On Fri, Mar 27, 2009 at 10:32 PM, 7stud -- <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:
>>
>> http://www.ruby-forum.com/topic/182480#new
>>
>
> Hi, you may find this thread helpful:
> 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?
Todd B. (Guest)
on 2009-03-27 23:08
(Received via mailing list)
On Fri, Mar 27, 2009 at 2:48 PM, 7stud -- <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
7stud -. (Guest)
on 2009-03-28 00:11
Todd B. wrote:
> On Fri, Mar 27, 2009 at 2:48 PM, 7stud -- <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/


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.
This topic is locked and can not be replied to.