Please help fixing gems on OSX

Hi, I am new to OSX and am a beginner rails developer.

I installed ruby 1.84 and ruby gems and rails and for a while
everything worked well.

Recently I tried to update rails using the gems manager and it failed,
producing an error referring to an incorrect date (sorry, didn't save
that error).

Since then I re-installed the gems manager and it fails completely
with:

/usr/local/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:52:in
`initialize': uninitialized constant Gem::CommandManager::HelpCommand
(NameError)
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:46:in
`instance'
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:25:in `run'
        from /usr/local/bin/gem:23

Is there someting I can do to fix this, or whould I reinstall (a URl
with clear instructions for removal + installation?) or should I
consider reinstalling ruby (how do I remove it?)

Thank you!

-- Andre

Andre,

If you installed 1.8.4 you already had gems. You didn't need to install anything else.

If you built Ruby with:

./configure
make
make test
sudo make install

Just do that over.

···

On Aug 12, 2006, at 8:40 PM, andre in LA wrote:

Recently I tried to update rails using the gems manager and it failed,
producing an error referring to an incorrect date (sorry, didn't save
that error).

Since then I re-installed the gems manager and it fails completely
with:

--
Vegetarians eat Vegetables, Humanitarians frighten me

I downloaded gems and ran sudo ruby setup.rb which seemed to run OK.

When I run gem, though, I get

sexy-beast:~ user$ gem
/usr/local/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:52:in
`initialize': uninitialized constant Gem::CommandManager::HelpCommand
(NameError)
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:46:in
`instance'
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:25:in `run'
        from /usr/local/bin/gem:23

any ideas?

.bash_login contains
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"

and which gem returns

sexy-beast:~ user$ which gem
/usr/local/bin/gem

Thank you!
-- Andre

Please consider my being very new to Mac OSX and BSD Unix.

I installed Ruby 1.8.4 by following a list of shell commands ( I
believe

).

I don't mind downloading/installing everything again; I am just not
sure whether this would fix the issue. Maybe I need to remove the
current ruby installation/configuration files first? If so, are there
instructions somewhere? I googled for uninstalling ruby / fixing gems
but could not find anything useful.

Thank you in advance,

-- Andre

···

Andre,

If you installed 1.8.4 you already had gems. You didn't need to
install anything else.

If you built Ruby with:

/configure
make
make test
sudo make install

Just do that over.
--
Vegetarians eat Vegetables, Humanitarians frighten me

Incorrect. No version of Ruby ships with Rubygems.

···

On Aug 13, 2006, at 5:28 AM, Chris Gehlker wrote:

On Aug 12, 2006, at 8:40 PM, andre in LA wrote:

Recently I tried to update rails using the gems manager and it failed,
producing an error referring to an incorrect date (sorry, didn't save
that error).

Since then I re-installed the gems manager and it fails completely
with:

Andre,

If you installed 1.8.4 you already had gems. You didn't need to install anything else.

--
Eric Hodel - drbrain@segment7.net - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com

OK, I would have used .bash_profile rather than .bash_login but OK. The part about needing to install readln and gems separately is just mistaken but I can't see how it would do any harm. Using curl to download a file rather than just clicking on the link also strikes me as weird but it should work.

One think that is emphasized, but is easy to get get wrong, is setting your path so that you will be accessing the new Ruby rather than the old one. Try typing
'which ruby' on the command line. Report back what it says. If it's not /usr/local/bin/ruby then your path isn't set right. You can also do 'ruby -v' to make sure you have 10.8.4 or 5.

Finally, you need a file named .inputrc in your home folder that contains:
set completion-ignore-case On

This has nothing to do with ruby. it just makes it bearable to use bash on a case insensitive file system with the case sensitive unix tools.

···

On Aug 15, 2006, at 5:10 PM, andre in LA wrote:

Please consider my being very new to Mac OSX and BSD Unix.

I installed Ruby 1.8.4 by following a list of shell commands ( I
believe
Dan Benjamin
).

--
A young idea is a beautiful and a fragile thing. Attack people, not ideas.

Huh?

Last login: Wed Aug 16 03:32:11 on ttyp1
Welcome to Darwin!
~ $ which gem
/usr/local/bin/gem

Did the elves sneak in and install this on my machine? I know I didn't.

···

On Aug 16, 2006, at 3:17 PM, Eric Hodel wrote:

On Aug 13, 2006, at 5:28 AM, Chris Gehlker wrote:

On Aug 12, 2006, at 8:40 PM, andre in LA wrote:

Recently I tried to update rails using the gems manager and it failed,
producing an error referring to an incorrect date (sorry, didn't save
that error).

Since then I re-installed the gems manager and it fails completely
with:

Andre,

If you installed 1.8.4 you already had gems. You didn't need to install anything else.

Incorrect. No version of Ruby ships with Rubygems.

--
Vegetarians eat Vegetables, Humanitarians frighten me

Somebody downloaded the rubygems tarball and ran sudo ruby setup.rb on your machine. That's how it got there.

···

On Aug 16, 2006, at 3:40 PM, Chris Gehlker wrote:

On Aug 16, 2006, at 3:17 PM, Eric Hodel wrote:

On Aug 13, 2006, at 5:28 AM, Chris Gehlker wrote:

On Aug 12, 2006, at 8:40 PM, andre in LA wrote:

Recently I tried to update rails using the gems manager and it failed,
producing an error referring to an incorrect date (sorry, didn't save
that error).

Since then I re-installed the gems manager and it fails completely
with:

Andre,

If you installed 1.8.4 you already had gems. You didn't need to install anything else.

Incorrect. No version of Ruby ships with Rubygems.

Huh?

Last login: Wed Aug 16 03:32:11 on ttyp1
Welcome to Darwin!
~ $ which gem
/usr/local/bin/gem

Did the elves sneak in and install this on my machine? I know I didn't.

--
Eric Hodel - drbrain@segment7.net - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com

Recently I tried to update rails using the gems manager and it failed,
producing an error referring to an incorrect date (sorry, didn't save
that error).

Since then I re-installed the gems manager and it fails completely
with:

Andre,

If you installed 1.8.4 you already had gems. You didn't need to install anything else.

Incorrect. No version of Ruby ships with Rubygems.

Huh?

Last login: Wed Aug 16 03:32:11 on ttyp1
Welcome to Darwin!
~ $ which gem
/usr/local/bin/gem

Did the elves sneak in and install this on my machine? I know I didn't.

yes the elves did sneak in. Don't believe me or Eric? Download ruby-1.8.4.tar.gz, install it to some prefix of your choosing and grep for gem.

···

On Aug 16, 2006, at 6:40 PM, Chris Gehlker wrote:

On Aug 16, 2006, at 3:17 PM, Eric Hodel wrote:

On Aug 13, 2006, at 5:28 AM, Chris Gehlker wrote:

On Aug 12, 2006, at 8:40 PM, andre in LA wrote:

--
Vegetarians eat Vegetables, Humanitarians frighten me

Well, I actually though of that and confirmed for myself that it didn't install gem. So i must have done it late one night in a moment of mental aberration. That makes me believe even more that the op has a PATH problem.

···

On Aug 16, 2006, at 5:07 PM, Logan Capaldo wrote:

yes the elves did sneak in. Don't believe me or Eric? Download ruby-1.8.4.tar.gz, install it to some prefix of your choosing and grep for gem.

--
Egotism is the anesthetic that dulls the pain of stupidity.
-Frank William Leahy, football coach (1908-1973)

I downloaded gems and ran sudo ruby setup.rb which seemed to run OK.

When I run gem, though, I get

sexy-beast:~ user$ gem
/usr/local/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:52:in
`initialize': uninitialized constant Gem::CommandManager::HelpCommand
(NameError)
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:46:in
`instance'
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:25:in `run'
        from /usr/local/bin/gem:23

any ideas?

.bash_login contains
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"

and which gem returns

sexy-beast:~ user$ which gem
/usr/local/bin/gem

Thank you!
-- Andre

Eric Hodel wrote:

···

On Aug 16, 2006, at 3:40 PM, Chris Gehlker wrote:

> On Aug 16, 2006, at 3:17 PM, Eric Hodel wrote:
>
>> On Aug 13, 2006, at 5:28 AM, Chris Gehlker wrote:
>>
>>> On Aug 12, 2006, at 8:40 PM, andre in LA wrote:
>>>
>>>> Recently I tried to update rails using the gems manager and it
>>>> failed,
>>>> producing an error referring to an incorrect date (sorry, didn't
>>>> save
>>>> that error).
>>>>
>>>> Since then I re-installed the gems manager and it fails completely
>>>> with:
>>>
>>> Andre,
>>>
>>> If you installed 1.8.4 you already had gems. You didn't need to
>>> install anything else.
>>
>> Incorrect. No version of Ruby ships with Rubygems.
>
> Huh?
>
>
> Last login: Wed Aug 16 03:32:11 on ttyp1
> Welcome to Darwin!
> ~ $ which gem
> /usr/local/bin/gem
>
> Did the elves sneak in and install this on my machine? I know I
> didn't.

Somebody downloaded the rubygems tarball and ran sudo ruby setup.rb
on your machine. That's how it got there.

--
Eric Hodel - drbrain@segment7.net - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com

I downloaded gems and ran sudo ruby setup.rb which seemed to run OK.

When I run gem, though, I get

sexy-beast:~ user$ gem
/usr/local/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:52:in
`initialize': uninitialized constant Gem::CommandManager::HelpCommand
(NameError)
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:46:in
`instance'
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:25:in `run'
        from /usr/local/bin/gem:23

I get:
~ $ gem

RubyGems is a sophisticated package manager for Ruby. This is a
basic help message containing pointers to more information.

   Usage:
     gem -h/--help
     gem -v/--version
     gem command [arguments...] [options...]

   Examples:
     gem install rake
     gem list --local
     gem build package.gemspec
     gem help install

   Further help:
     gem help commands list all 'gem' commands
     gem help examples show some examples of usage
     gem help <COMMAND> show help on COMMAND
                                    (e.g. 'gem help install')
   Further information:
     http://rubygems.rubyforge.org

.bash_login contains
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"

my PATH is:
~ $ echo $PATH
/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin

which start with '/usr/local/bin' the same as yours.

and which gem returns

sexy-beast:~ user$ which gem
/usr/local/bin/gem

ditto here.

All of which means that I'm totally stumped. Just out of curiosity, does:
~ $ which ruby
yield
/usr/local/bin/ruby?

···

On Sep 6, 2006, at 1:15 AM, andre in LA wrote:

--
The folly of mistaking a paradox for a discovery, a metaphor for a proof, a torrent of verbiage for a spring of capital truths, and oneself for an oracle, is inborn in us.
-Paul Valery, poet and philosopher (1871-1945)

which gem yelds
/usr/local/bin/gem

That's good. What does 'which ruby' yield?

···

On Sep 8, 2006, at 3:16 AM, andre in LA wrote:

which gem yelds
/usr/local/bin/gem

--
Egotism is the anesthetic that dulls the pain of stupidity.
-Frank William Leahy, football coach (1908-1973)

which ruby yelds
/usr/local/bin/ruby

the version of ruby is 1.8.4

Thank you in advance
-- Andre

Chris Gehlker wrote:

···

On Sep 8, 2006, at 3:16 AM, andre in LA wrote:

> which gem yelds
> /usr/local/bin/gem

That's good. What does 'which ruby' yield?

--
Egotism is the anesthetic that dulls the pain of stupidity.
-Frank William Leahy, football coach (1908-1973)

Don't thank me for much. If I recall correctly, if you just type 'gem' on the command line you get some kind of error message instead of a helpful explanation of usage. The thing is that I have exactly the same setup as you and it just works. Well I'm using ruby 1.8.5 now but it did work when I was on 1.8.4. I installed SWIG to get Instiki to work but to the best of my recollection gem was working for me before I did that. You might give it a try. You don't have anything to loose at this point. <http://www.swig.org/&gt;
Maybe someone more knowledgeable than I will chime in.

···

On Sep 8, 2006, at 3:10 PM, andre in LA wrote:

which ruby yelds
/usr/local/bin/ruby

the version of ruby is 1.8.4

Thank you in advance

--
The folly of mistaking a paradox for a discovery, a metaphor for a proof, a torrent of verbiage for a spring of capital truths, and oneself for an oracle, is inborn in us.
-Paul Valery, poet and philosopher (1871-1945)