[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Rubygem install "Invalid argument - sources-0.0.1.gem"

Jeremy Lecour

1/26/2007 2:06:00 PM

Hi,

This morning, I wanted to upgrade my rubygems install : 0.9.0 -> 0.9.1

I've launched "ruby setup.rb" as root and got that at the end :

hook /var/www/rubygems-0.9.1/./post-install.rb failed:
Invalid argument - sources-0.0.1.gem
Try 'ruby setup.rb --help' for detailed usage.

I've messed with rubygems files trying to delete it and do a fresh
install but now I don't have any working version of rubygems.

It's the same if I try to re-install rubygems 0.9.0.

I'm on Debian testing.

Thanks for any help !

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

15 Answers

Eric Hodel

1/27/2007 10:05:00 PM

0

On Jan 26, 2007, at 06:05, Jeremy Lecour wrote:

> This morning, I wanted to upgrade my rubygems install : 0.9.0 -> 0.9.1
>
> I've launched "ruby setup.rb" as root and got that at the end :
>
> hook /var/www/rubygems-0.9.1/./post-install.rb failed:
> Invalid argument - sources-0.0.1.gem
> Try 'ruby setup.rb --help' for detailed usage.

What does:

ruby -d setup.rb

say when it gets to post-install.rb?

--
Eric Hodel - drbrain@segment7.net - http://blog.se...

I LIT YOUR GEM ON FIRE!


Jeremy Lecour

1/28/2007 8:12:00 AM

0

Eric Hodel wrote:
> What does:
>
> ruby -d setup.rb
>
> say when it gets to post-install.rb?

I get this :

Exception `Errno::EINVAL' at
/usr/local/lib/site_ruby/1.8/rubygems/package.rb:264 - Invalid argument
- sources-0.0.1.gem
Exception `Errno::EINVAL' at setup.rb:590 - Invalid argument -
sources-0.0.1.gem
Exception `SetupError' at setup.rb:40 - hook
/var/www/rubygems-0.9.1/./post-install.rb failed:
Invalid argument - sources-0.0.1.gem
Exception `SetupError' at setup.rb:1362 - hook
/var/www/rubygems-0.9.1/./post-install.rb failed:
Invalid argument - sources-0.0.1.gem
setup.rb:40:in `setup_rb_error': hook
/var/www/rubygems-0.9.1/./post-install.rb failed: (SetupError)
Invalid argument - sources-0.0.1.gem from setup.rb:592:in
`try_run_hook'
from setup.rb:584:in `run_hook'
from setup.rb:1322:in `exec_task_traverse'
from setup.rb:1175:in `exec_install'
from setup.rb:894:in `exec_install'
from setup.rb:712:in `invoke'
from setup.rb:681:in `invoke'
from setup.rb:1359


Thanks for your help !

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

Jeremy Lecour

1/30/2007 8:39:00 AM

0

Is there any lead around here ?
I'm completly stuck :(

Thanks

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

Jeremy Lecour

1/30/2007 3:36:00 PM

0

Hi,

I forgot to say that the computer is a Sun Enterprise 220R : dual
Sparc64.

I don't think it's important because I managed to install rubygems 0.9.0
once without any problem and now 0.9.0 and 0.9.1 are not working.

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

Jeremy Lecour

2/6/2007 9:30:00 AM

0

Hi, I get the same with rubtgems 0.9.2

I think I'm very unlucky !


>> ruby -d setup.rb
>
> Exception `Errno::EINVAL' at
> /usr/local/lib/site_ruby/1.8/rubygems/package.rb:264 - Invalid argument
> - sources-0.0.1.gem
> Exception `Errno::EINVAL' at setup.rb:590 - Invalid argument -
> sources-0.0.1.gem
> Exception `SetupError' at setup.rb:40 - hook
> /var/www/rubygems-0.9.1/./post-install.rb failed:
> Invalid argument - sources-0.0.1.gem
> Exception `SetupError' at setup.rb:1362 - hook
> /var/www/rubygems-0.9.1/./post-install.rb failed:
> Invalid argument - sources-0.0.1.gem
> setup.rb:40:in `setup_rb_error': hook
> /var/www/rubygems-0.9.1/./post-install.rb failed: (SetupError)
> Invalid argument - sources-0.0.1.gem from setup.rb:592:in
> `try_run_hook'
> from setup.rb:584:in `run_hook'
> from setup.rb:1322:in `exec_task_traverse'
> from setup.rb:1175:in `exec_install'
> from setup.rb:894:in `exec_install'
> from setup.rb:712:in `invoke'
> from setup.rb:681:in `invoke'
> from setup.rb:1359

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

Eric Hodel

2/6/2007 8:41:00 PM

0

On Jan 28, 2007, at 24:11, Jeremy Lecour wrote:
> Eric Hodel wrote:
>> What does:
>>
>> ruby -d setup.rb
>>
>> say when it gets to post-install.rb?
>
> I get this :
>
> Exception `Errno::EINVAL' at
> /usr/local/lib/site_ruby/1.8/rubygems/package.rb:264 - Invalid
> argument
> - sources-0.0.1.gem

Can you verify what the lines surrounding this line are?

cat -n /usr/local/lib/site_ruby/1.8/rubygems/package.rb | grep '26[0-9]'




Jeremy Lecour

2/6/2007 9:49:00 PM

0

> cat -n /usr/local/lib/site_ruby/1.8/rubygems/package.rb | grep '26[0-9]'

260 final_pos = @io.pos
261 @io.pos = init_pos
262 header = TarHeader.new(:name => name, :mode => mode,
263 :size => size, :prefix =>
prefix).to_s
264 @io.write header
265 @io.pos = final_pos
266 end
267
268 def mkdir(name, mode)
269 raise ClosedIO if @closed


Thanks for your answer

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

Eric Hodel

2/7/2007 1:09:00 AM

0

On Feb 6, 2007, at 13:49, Jeremy Lecour wrote:
>> cat -n /usr/local/lib/site_ruby/1.8/rubygems/package.rb | grep '26
>> [0-9]'
>
> 260 final_pos = @io.pos
> 261 @io.pos = init_pos
> 262 header = TarHeader.new(:name => name, :mode => mode,
> 263 :size => size, :prefix =>
> prefix).to_s
> 264 @io.write header
> 265 @io.pos = final_pos
> 266 end
> 267
> 268 def mkdir(name, mode)
> 269 raise ClosedIO if @closed

Hrm, it seems that something bogus is going on with your installation.

First, site_ruby should be under /usr/local/lib/ruby, not /usr/local/
lib.

Second, line 264 should be "@io.pos = final_pos", not what you've got.

Can you try removing /usr/local/lib/site_ruby/1.8/rubygems.rb and /
usr/local/lib/site_ruby/1.8/rubygems/* and reinstalling? I suspect
those files are from an older version of RubyGems and are getting in
the way.

Jeremy Lecour

2/7/2007 8:56:00 AM

0

> First, site_ruby should be under /usr/local/lib/ruby, not /usr/local/
> lib.

I've removed everything, including ruby itself, â?¦
when I do "apt-get install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8
libreadline-ruby1.8 libruby1.8", I get things in "/usr/lib/ruby/1.8/"

I thing I have to tune the setup config for Rubygems, but I don't know
which way.

Thanks for your help

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

Jeremy Lecour

2/7/2007 9:00:00 AM

0

Jeremy Lecour wrote:
>> First, site_ruby should be under /usr/local/lib/ruby, not /usr/local/
>> lib.
>
> I've removed everything, including ruby itself, â?¦
> when I do "apt-get install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8
> libreadline-ruby1.8 libruby1.8", I get things in "/usr/lib/ruby/1.8/"
>
> I thing I have to tune the setup config for Rubygems, but I don't know
> which way.
>
> Thanks for your help

If do "ruby setup.rb config" then "ruby setup.rb show" :
prefix /usr
bindir $prefix/bin
libdir $prefix/lib
datadir $prefix/share
mandir $prefix/share/man
sysconfdir /etc
stdruby $libdir/ruby/1.8
siteruby $prefix/local/lib/site_ruby
siterubyver $siteruby/1.8
siterubyverarch $siterubyver/sparc-linux
rbdir $siterubyver
sodir $siterubyverarch
rubypath /usr/bin/ruby1.8
rubyprog /usr/bin/ruby1.8
makeprog make
shebang ruby
without-ext no

But I don't understand why it is using "siteruby" instead of "stdruby"
which seems to be right for me.

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