[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

error trying to install ruby gems 1.3.1

7stud --

2/24/2009 6:06:00 PM

~/my_tar_extractions/rubygems-1.3.1$ sudo ruby setup.rb
Password:
/lib/rubygems.rb:723:in `set_paths': uninitialized constant Gem::Etc
(NameError)
from ./lib/rubygems.rb:719:in `each'
from ./lib/rubygems.rb:719:in `set_paths'
from ./lib/rubygems.rb:526:in `path'
from ./lib/rubygems/source_index.rb:66:in
`installed_spec_directories'
from ./lib/rubygems/source_index.rb:56:in `from_installed_gems'
from ./lib/rubygems.rb:736:in `source_index'
from ./lib/rubygems/gem_path_searcher.rb:86:in `init_gemspecs'
from ./lib/rubygems/gem_path_searcher.rb:21:in `initialize'
from ./lib/rubygems.rb:684:in `new'
from ./lib/rubygems.rb:684:in `searcher'
from ./lib/rubygems.rb:683:in `synchronize'
from ./lib/rubygems.rb:683:in `searcher'
from ./lib/rubygems/custom_require.rb:34:in `require'
from /usr/lib/ruby/1.8/tmpdir.rb:12
from ./lib/rubygems/custom_require.rb:31:in
`gem_original_require'
from ./lib/rubygems/custom_require.rb:31:in `require'
from setup.rb:95


mac osx 10.4.11

Any ideas on what went wrong?
--
Posted via http://www.ruby-....

11 Answers

matt

2/24/2009 7:04:00 PM

0

7stud -- <bbxx789_05ss@yahoo.com> wrote:

> uninitialized constant Gem::Etc

Google sez:

<http://rubyforge.org/tracker/index.php?func=detail&aid=22313&...
26&atid=575>

But what I don't get is: I've got gem 1.3.1 and I never had this problem
(same system as you). Perhaps this is a difference between installing
from source and installing from gem.

m.

--
matt neuburg, phd = matt@tidbits.com, http://www.tidbits...
Leopard - http://www.takecontrolbooks.com/leopard-custom...
AppleScript - http://www.amazon.com/gp/product/...
Read TidBITS! It's free and smart. http://www.t...

7stud --

2/25/2009 3:54:00 AM

0

matt neuburg wrote:
> 7stud -- <bbxx789_05ss@yahoo.com> wrote:
>
>> uninitialized constant Gem::Etc
>
> Google sez:
>
> <http://rubyforge.org/tracker/index.php?func=detail&aid=22313&...
> 26&atid=575>
>
> But what I don't get is: I've got gem 1.3.1 and I never had this problem
> (same system as you). Perhaps this is a difference between installing
> from source and installing from gem.
>
> m.

Hi,

Thanks for the response. My gem questions usually go unanswered. In my
short experience with the gem system, it is a ponderously slow(bulk
updating) broken piece of junk. The gem website here:

http://www.rubygems.org/read/chapte...

says:

-------
If your RubyGems version is 0.8.5 or later, you can upgrade to the
latest version with:

gem update --system
------

I have ruby-gems 0.9.4 installed, and a couple of weeks ago I tried to
update ruby-gems using that command, and I posted here that I got this
error:


$ sudo gem update --system
Password:
Updating RubyGems...
Attempting remote update of rubygems-update
Successfully installed rubygems-update-1.0.0
Updating version of RubyGems to 1.3.1
ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory -
/usr/lib/ruby/gems/1.8/gems/rubygems-update-1.3.1

What version of ruby do you have installed?

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






--
Posted via http://www.ruby-....

matt

2/25/2009 3:50:00 PM

0

7stud -- <bbxx789_05ss@yahoo.com> wrote:

> matt neuburg wrote:
> > 7stud -- <bbxx789_05ss@yahoo.com> wrote:
> >
> >> uninitialized constant Gem::Etc
> >
> > Google sez:
> >
> > <http://rubyforge.org/tracker/index.php?func=detail&aid=22313&...
> > 26&atid=575>
> >
> > But what I don't get is: I've got gem 1.3.1 and I never had this problem
> > (same system as you). Perhaps this is a difference between installing
> > from source and installing from gem.
> >
> > m.
>
> Hi,
>
> Thanks for the response. My gem questions usually go unanswered. In my
> short experience with the gem system, it is a ponderously slow(bulk
> updating) broken piece of junk. The gem website here:
>
> http://www.rubygems.org/read/chapte...
>
> says:
>
> -------
> If your RubyGems version is 0.8.5 or later, you can upgrade to the
> latest version with:
>
> gem update --system
> ------
>
> I have ruby-gems 0.9.4 installed, and a couple of weeks ago I tried to
> update ruby-gems using that command, and I posted here that I got this
> error:
>
>
> $ sudo gem update --system
> Password:
> Updating RubyGems...
> Attempting remote update of rubygems-update
> Successfully installed rubygems-update-1.0.0
> Updating version of RubyGems to 1.3.1
> ERROR: While executing gem ... (Errno::ENOENT)
> No such file or directory -
> /usr/lib/ruby/gems/1.8/gems/rubygems-update-1.3.1
>
> What version of ruby do you have installed?
>
> $ ruby -v
> ruby 1.8.2 (2004-12-25) [universal-darwin8.0]

I'm no big expert, but at least we have similar systems so a comparison
might be useful in tracking this stuff down. I am using,

ruby 1.8.6 (2008-03-03 patchlevel 114) [powerpc-darwin8.9.0]

My working ruby is in /usr/local.

I've left the built-in ruby in place, so I also have /usr/bin/ruby:

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

But I don't use it.

But I don't think that's the issue. When you get an error message
warning that there is no directory rubygems-update-1.3.1, I tend to
think that this is because you are supposed to have such a directory.
Your quoted material says "Successfully installed
rubygems-update-1.0.0"; but the current version is 1.3.1. So that must
be what rubygems is looking for. I *do* have such a directory:

/usr/local/lib/ruby/gems/1.8/gems/rubygems-update-1.3.1

I think you need that before you can proceed. Of course mine is in a
different place because my ruby is in a different place.

So you could probably get things working by following this procedure
(but use sudo):

$ gem install rubygems-update
$ update_rubygems

However, you don't really need to do that, because, as the Google-found
ruby-forge page I cited says, there was a bug, it has been fixed, and
you can check out working code from the trunk. So your setup.rb approach
should also now work.

m.

--
matt neuburg, phd = matt@tidbits.com, http://www.tidbits...
Leopard - http://www.takecontrolbooks.com/leopard-custom...
AppleScript - http://www.amazon.com/gp/product/...
Read TidBITS! It's free and smart. http://www.t...

7stud --

2/25/2009 5:42:00 PM

0

matt neuburg wrote:
> 7stud -- <bbxx789_05ss@yahoo.com> wrote:
>
>> > But what I don't get is: I've got gem 1.3.1 and I never had this problem
>>
>>
>> Updating version of RubyGems to 1.3.1
>> ERROR: While executing gem ... (Errno::ENOENT)
>> No such file or directory -
>> /usr/lib/ruby/gems/1.8/gems/rubygems-update-1.3.1
>>
>> What version of ruby do you have installed?
>>
>> $ ruby -v
>> ruby 1.8.2 (2004-12-25) [universal-darwin8.0]
>
> I'm no big expert, but at least we have similar systems so a comparison
> might be useful in tracking this stuff down. I am using,
>
> ruby 1.8.6 (2008-03-03 patchlevel 114) [powerpc-darwin8.9.0]
>
> My working ruby is in /usr/local.
>

What install directions did you use to install 1.8.6?


> I've left the built-in ruby in place, so I also have /usr/bin/ruby:
>
> ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0]
>
> But I don't use it.
>
> But I don't think that's the issue. When you get an error message
> warning that there is no directory rubygems-update-1.3.1, I tend to
> think that this is because you are supposed to have such a directory.
> Your quoted material says "Successfully installed
> rubygems-update-1.0.0"; but the current version is 1.3.1. So that must
> be what rubygems is looking for. I *do* have such a directory:
>
> /usr/local/lib/ruby/gems/1.8/gems/rubygems-update-1.3.1
>
> I think you need that before you can proceed. Of course mine is in a
> different place because my ruby is in a different place.
>

Is that a directory or a file? I looked around on ruby-forge and saw
this:

rubygems-update-1.3.1.gem

and since that matched the file the error message said was missing, I
thought I'd download it and try putting it in the directory indicated in
the error message. When I downloaded that file, it arrived as
rubygems-update-1.3.1.gem.tar and when I tried to untar it:

$ tar -xvf rubygems-update-1.3.1.gem.tar

I got this output:

data.tar.gz
tar: data.tar.gz: implausibly old time stamp 1969-12-31 17:00:00
metadata.gz
tar: metadata.gz: implausibly old time stamp 1969-12-31 17:00:00
data.tar.gz.sig
tar: data.tar.gz.sig: implausibly old time stamp 1969-12-31 17:00:00
metadata.gz.sig
tar: metadata.gz.sig: implausibly old time stamp 1969-12-31 17:00:00

which I thought was an error message, but now I realize that untaring
produced these two files:

metadata.gz
metadata.gz.sig


> So you could probably get things working by following this procedure
> (but use sudo):
>
> $ gem install rubygems-update
> $ update_rubygems
>

Shouldn't the first command be:

$ gem install -r rubygems-update

-r for remote

And what does the second command do?


> However, you don't really need to do that, because, as the Google-found
> ruby-forge page I cited says, there was a bug, it has been fixed, and
> you can check out working code from the trunk. So your setup.rb approach
> should also now work.
>

Do I re-download rubygems-1.3.1?

Thanks.

--
Posted via http://www.ruby-....

7stud --

2/25/2009 5:48:00 PM

0

7stud -- wrote:
>> $ gem install rubygems-update
>> $ update_rubygems
>>
>
> Shouldn't the first command be:
>
> $ gem install -r rubygems-update
>
> -r for remote
>
> And what does the second command do?
>

Ah, I see. That is the way to update for old versions of ruby-gems:

---
Prior to RubyGems 0.8.5
If you current version of RubyGems is prior to version 0.8.5, then use
the following commands:

gem install rubygems-update
update_rubygems
---

vs.

----
Modern Versions of RubyGems
If your RubyGems version is 0.8.5 or later, you can upgrade to the
latest version with:

gem update --system
----
--
Posted via http://www.ruby-....

Brian Candler

2/25/2009 5:59:00 PM

0

7stud -- wrote:
> My gem questions usually go unanswered. In my
> short experience with the gem system, it is a ponderously slow(bulk
> updating) broken piece of junk.

It was: on a 512MB system, rubygems would happily eat up all available
memory and go deep into swap.

However 1.3.x seems to have fixed that.
--
Posted via http://www.ruby-....

7stud --

2/25/2009 6:33:00 PM

0

Brian Candler wrote:
> 7stud -- wrote:
>> My gem questions usually go unanswered. In my
>> short experience with the gem system, it is a ponderously slow(bulk
>> updating) broken piece of junk.
>
> It was: on a 512MB system, rubygems would happily eat up all available
> memory and go deep into swap.
>
> However 1.3.x seems to have fixed that.

...but as you can see, installing 1.3.x is broken. Sort of a catch-22.
--
Posted via http://www.ruby-....

Eric Hodel

2/25/2009 7:02:00 PM

0

On Feb 25, 2009, at 10:32, 7stud -- wrote:
> Brian Candler wrote:
>> 7stud -- wrote:
>>> My gem questions usually go unanswered. In my
>>> short experience with the gem system, it is a ponderously slow(bulk
>>> updating) broken piece of junk.
>>
>> It was: on a 512MB system, rubygems would happily eat up all
>> available
>> memory and go deep into swap.
>>
>> However 1.3.x seems to have fixed that.
>
> ...but as you can see, installing 1.3.x is broken. Sort of a
> catch-22.

No, your ruby is missing Etc. RubyGems' reporting of this fact is
broken.

matt

2/26/2009 1:23:00 AM

0

7stud -- <bbxx789_05ss@yahoo.com> wrote:

> > I'm no big expert, but at least we have similar systems so a comparison
> > might be useful in tracking this stuff down. I am using,
> >
> > ruby 1.8.6 (2008-03-03 patchlevel 114) [powerpc-darwin8.9.0]
> >
> > My working ruby is in /usr/local.
> >
>
> What install directions did you use to install 1.8.6?

Why? Are you suggesting I did it wrong? As far as I know, this is a
completely normal arrangement. m.

--
matt neuburg, phd = matt@tidbits.com, http://www.tidbits...
Leopard - http://www.takecontrolbooks.com/leopard-custom...
AppleScript - http://www.amazon.com/gp/product/...
Read TidBITS! It's free and smart. http://www.t...

7stud --

2/26/2009 1:51:00 AM

0

matt neuburg wrote:
> 7stud -- <bbxx789_05ss@yahoo.com> wrote:
>
>> > I'm no big expert, but at least we have similar systems so a comparison
>> > might be useful in tracking this stuff down. I am using,
>> >
>> > ruby 1.8.6 (2008-03-03 patchlevel 114) [powerpc-darwin8.9.0]
>> >
>> > My working ruby is in /usr/local.
>> >
>>
>> What install directions did you use to install 1.8.6?
>
> Why? Are you suggesting I did it wrong? As far as I know, this is a
> completely normal arrangement. m.

No. I would like to update to 1.8.6.

--
Posted via http://www.ruby-....