rubygems update/upgrade error...

7

7stud --

$ sudo gem update --system
Password:
Updating RubyGems...
Bulk updating Gem source index for: http://gems.rubyforge.org
Attempting remote update of rubygems-update
Successfully installed rubygems-update-1.0.0
Updating version of RubyGems to 1.0.1
ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory -
/usr/lib/ruby/gems/1.8/gems/rubygems-update-1.0.1
 
J

John Joyce

$ sudo gem update --system
Password:
Updating RubyGems...
Bulk updating Gem source index for: http://gems.rubyforge.org
Attempting remote update of rubygems-update
Successfully installed rubygems-update-1.0.0
Updating version of RubyGems to 1.0.1
ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory -
/usr/lib/ruby/gems/1.8/gems/rubygems-update-1.0.1

Check to see that your PATH has not been changed by a recent
installation of something (such as a new Python, etc...)
Not many people are using /usr/lib/ for Ruby on OS X 10.4
Usually, it's /usr/local/ or /opt/something if you use MacPorts/
DarwinPorts
 
7

7stud --

John said:
Check to see that your PATH has not been changed by a recent
installation of something (such as a new Python, etc...)

Here's my path:

PATH=/Library/Frameworks/Python.framework/Versions/Current/bin:/Library/boost_1_34_1/tools/jam/src/bin.macosxx86:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/mysql/bin:.

I don't think I installed anything recently, so I don't think my PATH
changed.
Not many people are using /usr/lib/ for Ruby on OS X 10.4
Usually, it's /usr/local/ or /opt/something if you use MacPorts/
DarwinPorts

I'm using the ruby that came pre-installed:

ruby 1.8.2 (2004-12-25) [universal-darwin8.0]
 
J

John Joyce

John said:
Check to see that your PATH has not been changed by a recent
installation of something (such as a new Python, etc...)

Here's my path:

PATH=/Library/Frameworks/Python.framework/Versions/Current/bin:/
Library/boost_1_34_1/tools/jam/src/bin.macosxx86:/bin:/sbin:/usr/
bin:/usr/sbin:/usr/local/mysql/bin:.

I don't think I installed anything recently, so I don't think my PATH
changed.
Not many people are using /usr/lib/ for Ruby on OS X 10.4
Usually, it's /usr/local/ or /opt/something if you use MacPorts/
DarwinPorts

I'm using the ruby that came pre-installed:

ruby 1.8.2 (2004-12-25) [universal-darwin8.0]

hmm...
your error was
Updating version of RubyGems to 1.0.1
ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory -
/usr/lib/ruby/gems/1.8/gems/rubygems-update-1.0.1

Looks like there either is an error in the path or something else...
I use the Hivelogic Ruby installation,
it places things in /usr/local
but preserves the system's default Ruby (always a good idea in case
there are things that expect it to be there as part of the standard
OS distribution)
When I look in that default OS X 10.4 directory /usr/lib/ruby/
there is no gems directory.
With my Ruby there is...
/usr/local/lib/ruby jj$ ls
1.8 gems site_ruby
so there should be a lib/ruby/gems/
directory, regardless of the location, but it appears to not exist
with the default Ruby.
You might note that the default Ruby installed on 10.4 has always
been considered fairly broken/wrong.
The one on 10.5 is better but still a bit different from more typical
Ruby installations on *NIXes.
I'd recommend going through the Hivelogic installation tutorial. It's
very straight forward and may offer some insight to how to install
this stuff in good and reliable way.
I know, it takes some time to do it all, and you'll want to use a
more recent version than what is in that tutorial, but you won't
regret it.
You might want to be running at least 1.8.4, I ran that for the last
year and a half, but 1.8.6 is the best yet.
1.9 is still in development though quite useable.
 
7

7stud --

John said:
I'd recommend going through the Hivelogic installation tutorial. It's
very straight forward and may offer some insight to how to install
this stuff in good and reliable way.
I know, it takes some time to do it all, and you'll want to use a
more recent version than what is in that tutorial, but you won't
regret it.
You might want to be running at least 1.8.4, I ran that for the last
year and a half, but 1.8.6 is the best yet.
1.9 is still in development though quite useable.

I guess I'm a little disappointed because when I originally installed
rubygems a few months ago, that install found all the directories it
needed. Now when I try to update to the current version of rubygems, I
get an error due to a missing directory. So it sounds like the update
program isn't compatible with the earlier install program--which is yet
another ruby annoyance.
 
7

7stud --

7stud said:
$ sudo gem update --system
Password:
Updating RubyGems...
Bulk updating Gem source index for: http://gems.rubyforge.org
Attempting remote update of rubygems-update
Successfully installed rubygems-update-1.0.0
Updating version of RubyGems to 1.0.1
ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory -
/usr/lib/ruby/gems/1.8/gems/rubygems-update-1.0.1

That error message is a little confusing as well. Notice the version
numbers. The error message says that a program named
rubygems-update-1.0.0 was successfully installed(downloaded?). Then it
says that something is "Updating version of RubyGems to 1.0.1", and
while attempting to do that, a program called rubygems-update-1.0.1
couldn't be found. But the update program that was downloaded is
version 1.0.0, but the error message says that something is looking for
an update program with version 1.0.1. Here is what the directory
/usr/lib/ruby/gems/1.8/ has in it:

/usr/lib/ruby/gems/1.8/gems$ ls
fastercsv-1.2.1 rake-0.7.3 sources-0.0.1
json-1.1.1 ruby-json-1.1.2
libxml-ruby-0.5.2.0 rubygems-update-1.0.0

There is no file named rubygems-update-1.0.1, and why should there be
when the message says that rubygems-update-1.0.0 is what was
"installed".
 
J

John Joyce

That error message is a little confusing as well. Notice the version
numbers. The error message says that a program named
rubygems-update-1.0.0 was successfully installed(downloaded?).
Then it
says that something is "Updating version of RubyGems to 1.0.1", and
while attempting to do that, a program called rubygems-update-1.0.1
couldn't be found. But the update program that was downloaded is
version 1.0.0, but the error message says that something is looking
for
an update program with version 1.0.1. Here is what the directory
/usr/lib/ruby/gems/1.8/ has in it:

/usr/lib/ruby/gems/1.8/gems$ ls
fastercsv-1.2.1 rake-0.7.3 sources-0.0.1
json-1.1.1 ruby-json-1.1.2
libxml-ruby-0.5.2.0 rubygems-update-1.0.0

There is no file named rubygems-update-1.0.1, and why should there be
when the message says that rubygems-update-1.0.0 is what was
"installed".
Ok, then first do this:
gem -v
find out what version you've got now.
Should be 1.0.0
right?
If not, go into rubygems-update-1.0.0
it is a directory.
there is a readme in there check what's in it. You might need to do
something with stuff in there first, then run the update again...
or perhaps one of the paths was wrong in the updater? (wrong for your
system)
You might need to set an explicit path for the updater.
You might even need to do a manual update.
None the less, the latest version should be 1.0.1
I had 6.x or 7.x before updating it myself recently.
I had Ruby 1.8.4 for a long time too.
Then recently, some gems were giving errors, so I updated things and
everything is working better.
 
7

7stud --

John said:
Ok, then first do this:
gem -v
find out what version you've got now.
Should be 1.0.0
right?

No. I have version:

$ gem -v
0.9.4

If not, go into rubygems-update-1.0.0
it is a directory.
there is a readme in there check what's in it. You might need to do
something with stuff in there first, then run the update again...

The readme just directs me to various places on the rubygems website
e.g. installation, faq, which I've already looked at.

or perhaps one of the paths was wrong in the updater? (wrong for your
system)

That's what I think.

You might need to set an explicit path for the updater.
You might even need to do a manual update.
None the less, the latest version should be 1.0.1
I had 6.x or 7.x before updating it myself recently.
I had Ruby 1.8.4 for a long time too.
Then recently, some gems were giving errors, so I updated things and
everything is working better.

I guess I'll install ruby 1.8.6 and go from there since it's not really
fair to ask people to spend a lot of time trying to fix installation
problems for old versions. Thanks for your help. I appreciate it.
 
7

7stud --

I installed ruby 1.8.6 with the "one click installer for mac osx" here:

http://www.ruby-lang.org/en/downloads/

(I had to close all Terminal windows before the correct version would
display in response to: ruby -v)

That installer installed rubygems version 0.9.4, so I updated to
rubygems 1.0.1 using this command:

$ sudo gem update --system

which didn't work at first:

$ sudo gem update --system
Password:
Updating RubyGems...
Bulk updating Gem source index for: http://gems.rubyforge.org
Attempting remote update of rubygems-update
ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find rubygems-update (> 0) in any repository


So I tried the same command again, and after a bunch of output, I got:

...
Removing old RubyGems RDoc and ri...
Installing rubygems-1.0.1 ri into
/usr/local/lib/ruby/gems/1.8/doc/rubygems-1.0.1/ri...
Installing rubygems-1.0.1 rdoc into
/usr/local/lib/ruby/gems/1.8/doc/rubygems-1.0.1/rdoc...
As of RubyGems 0.8.0, library stubs are no longer needed.
Searching $LOAD_PATH for stubs to optionally delete (may take a
while)...
...done.
No library stubs found.
RubyGems system software updated

So I think I am set.
 
7

7stud --

7stud said:
So I think I am set.

At the start of all the output was:

Updating version of RubyGems to 1.0.1
Installing RubyGems 1.0.1
install -c -m 0644 rbconfig/datadir.rb
/usr/local/lib/ruby/site_ruby/1.8/rbconfig/datadir.rb
....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top