gems installation - invalid gem format

  • Thread starter Serguei Cambour
  • Start date
S

Serguei Cambour

No matter on which OS you are, - XP Family, XP Pro or Ubuntu 9.10. No
matter if you have firewall 'hyper-sensitive' or proxy. When trying to
do gem update --system or even when trying to install a new gem like
'gem install [gem_name] I always got the below error:
------------------------------------------------------
serge@serge-laptop:~$ sudo gem install heroku
ERROR: Error installing heroku:
invalid gem format for /usr/lib/ruby/gems/1.8/cache/heroku-1.4.gem

serge@serge-laptop:~$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]
serge@serge-laptop:~$ gem -v
1.3.5
I always get the above error of '...invalid gem format..'. Any idea how
to resolve that? Something goes wrong in rubygems
commits/dependencies?Thank you.
 
A

Aaron Patterson

No matter on which OS you are, - XP Family, XP Pro or Ubuntu 9.10. No
matter if you have firewall 'hyper-sensitive' or proxy. When trying to
do gem update --system or even when trying to install a new gem like
'gem install [gem_name] I always got the below error:
------------------------------------------------------
serge@serge-laptop:~$ sudo gem install heroku
ERROR: Error installing heroku:
invalid gem format for /usr/lib/ruby/gems/1.8/cache/heroku-1.4.gem

serge@serge-laptop:~$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]
serge@serge-laptop:~$ gem -v
1.3.5
I always get the above error of '...invalid gem format..'. Any idea how
to resolve that? Something goes wrong in rubygems
commits/dependencies?Thank you.

Does this break with any other gem? Or is it only the heroku gem?
 
S

Serguei Cambour

Aaron said:
ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]
serge@serge-laptop:~$ gem -v
1.3.5
I always get the above error of '...invalid gem format..'. Any idea how
to resolve that? Something goes wrong in rubygems
commits/dependencies?Thank you.

Does this break with any other gem? Or is it only the heroku gem?

With any other gem, even when I tried from installing Ruby, then doing
(On Windows or Ubuntu - it was the same):

gem update --system
Updating RubyGems
Updating rubygems-update
ERROR: While executing gem ... (Gem::InstallError)
invalid gem format for
C:/Ruby/lib/ruby/gems/1.8/cache/rubygems-update-1.3.5
gem

Installing fromlocal rubygems-update-1.3.5 didn't solve the problem.
Only the error message changed. Instead of

invalid gem format for
C:/Ruby/lib/ruby/gems/1.8/cache/rubygems-update-1.3.5

I got

invalid gem format for C:/Ruby/lib/ruby/gems/1.8/cache/[gem_name]
 
L

Luis Lavena

Aaron said:
ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]
serge@serge-laptop:~$ gem -v
1.3.5
 I always get the above error of '...invalid gem format..'. Any ideahow
to resolve that? Something goes wrong in rubygems
commits/dependencies?Thank you.
Does this break with any other gem?  Or is it only the heroku gem?

With any other gem, even when I tried from installing Ruby, then doing
(On Windows or Ubuntu - it was the same):

gem update --system
Updating RubyGems
Updating rubygems-update
ERROR:  While executing gem ... (Gem::InstallError)
    invalid gem format for
C:/Ruby/lib/ruby/gems/1.8/cache/rubygems-update-1.3.5
gem

Installing fromlocal rubygems-update-1.3.5 didn't solve the problem.
Only the error message changed. Instead of

    invalid gem format for
C:/Ruby/lib/ruby/gems/1.8/cache/rubygems-update-1.3.5

I got

    invalid gem format for C:/Ruby/lib/ruby/gems/1.8/cache/[gem_name]

Can you remove 1.8/cache folder and try again?

This time, please execute the install command using --debug -V
options, which will provide us enough information to see where the
problem is.

Thank you,
 
S

Serguei Cambour

Luis said:
Installing fromlocal rubygems-update-1.3.5 didn't solve the problem.
Only the error message changed. Instead of

� � invalid gem format for
C:/Ruby/lib/ruby/gems/1.8/cache/rubygems-update-1.3.5

I got

� � invalid gem format for C:/Ruby/lib/ruby/gems/1.8/cache/[gem_name]

Can you remove 1.8/cache folder and try again?

This time, please execute the install command using --debug -V
options, which will provide us enough information to see where the
problem is.

Thank you,

I tried as you asked, here is the result:


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\serge>ruby -v
ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]

C:\Documents and Settings\serge>gem list

*** LOCAL GEMS ***

fxri (0.3.6)
fxruby (1.6.16)
hpricot (0.6.164)
log4r (1.0.5)
ptools (1.1.6)
rake (0.8.1)
ruby-opengl (0.60.0)
test-unit (2.0.1)
win32-api (1.2.1, 1.2.0)
win32-clipboard (0.4.4)
win32-dir (0.3.2)
win32-eventlog (0.5.0)
win32-file (0.5.5)
win32-file-stat (1.3.1)
win32-process (0.5.9)
win32-sapi (0.1.4)
win32-sound (0.4.1)
windows-api (0.2.4)
windows-pr (0.9.3)

C:\Documents and Settings\serge>gem update --system --debug -V
Exception `NameError' at
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:134 -
uninitiali
zed constant Gem::Commands::UpdateCommand
Updating RubyGems
GET 200 OK: http://gems.rubyforge.org/latest_specs.4.8.gz
Exception `Errno::EEXIST' at C:/Ruby/lib/ruby/1.8/fileutils.rb:243 -
File exists - C:/Documents and
Settings/serge/.gem/specs/gems.rubyforge.org%80
GET 200 OK: http://gemcutter.org/latest_specs.4.8.gz
Exception `Errno::EEXIST' at C:/Ruby/lib/ruby/1.8/fileutils.rb:243 -
File exists - C:/Documents and
Settings/serge/.gem/specs/gemcutter.org%80
Updating rubygems-update
GET 200 OK:
http://gemcutter.org/quick/Marshal.4.8/rubygems-update-1.3.5.gemspec.rz
Exception `Errno::EEXIST' at C:/Ruby/lib/ruby/1.8/fileutils.rb:243 -
File exists - C:/Documents and
Settings/serge/.gem/specs/gemcutter.org%80/quick/Marshal.4.8
Installing gem rubygems-update-1.3.5
Downloading gem rubygems-update-1.3.5.gem
GET 302 Moved Temporarily:
http://gemcutter.org/gems/rubygems-update-1.3.5.gem
GET 200 OK:
http://s3.amazonaws.com/gemcutter_production/gems/rubygems-update-1.3.5.gem
Exception `Gem::package::FormatError' at
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.r
b:112 - No metadata found!
Exception `Gem::InstallError' at
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/installer.rb:116 - invalid
gem format for C:/Ruby/lib/ruby/gems/1.8/cache/rubygems-update-1.3.5.gem
ERROR: While executing gem ... (Gem::InstallError)
invalid gem format for
C:/Ruby/lib/ruby/gems/1.8/cache/rubygems-update-1.3.5.gem
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/installer.rb:116:in
`initialize'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:236:in
`new'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:236:in
`install'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:219:in
`each'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:219:in
`install'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb:85:in
`execute'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb:81:in
`each'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb:81:in
`execute'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/command.rb:136:in
`invoke'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:105:in
`process_args'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:75:in
`run'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:39:in
`run'
C:/Ruby/bin/gem:24

C:\Documents and Settings\serge>
 
L

Luis Lavena

I tried as you asked, here is the result:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\serge>ruby -v
ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]

C:\Documents and Settings\serge>gem list

*** LOCAL GEMS ***

fxri (0.3.6)
fxruby (1.6.16)
hpricot (0.6.164)
log4r (1.0.5)
ptools (1.1.6)
rake (0.8.1)
ruby-opengl (0.60.0)
test-unit (2.0.1)
win32-api (1.2.1, 1.2.0)
win32-clipboard (0.4.4)
win32-dir (0.3.2)
win32-eventlog (0.5.0)
win32-file (0.5.5)
win32-file-stat (1.3.1)
win32-process (0.5.9)
win32-sapi (0.1.4)
win32-sound (0.4.1)
windows-api (0.2.4)
windows-pr (0.9.3)

That means that you remove the cache gem folder? The gem list is only
going to display the installed ones.
C:\Documents and Settings\serge>gem update --system --debug -V
Exception `NameError' at
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:134 -
uninitiali
zed constant Gem::Commands::UpdateCommand
Updating RubyGems
GET 200 OK:http://gems.rubyforge.org/latest_specs.4.8.gz
Exception `Errno::EEXIST' at C:/Ruby/lib/ruby/1.8/fileutils.rb:243 -
File exists - C:/Documents and
Settings/serge/.gem/specs/gems.rubyforge.org%80
GET 200 OK:http://gemcutter.org/latest_specs.4.8.gz
Exception `Errno::EEXIST' at C:/Ruby/lib/ruby/1.8/fileutils.rb:243 -
File exists - C:/Documents and
Settings/serge/.gem/specs/gemcutter.org%80
Updating rubygems-update
GET 200 OK:http://gemcutter.org/quick/Marshal.4.8/rubygems-update-1.3.5.gemspec.rz
Exception `Errno::EEXIST' at C:/Ruby/lib/ruby/1.8/fileutils.rb:243 -
File exists - C:/Documents and
Settings/serge/.gem/specs/gemcutter.org%80/quick/Marshal.4.8
Installing gem rubygems-update-1.3.5
Downloading gem rubygems-update-1.3.5.gem
GET 302 Moved Temporarily:http://gemcutter.org/gems/rubygems-update-1.3.5..gem
GET 200 OK:http://s3.amazonaws.com/gemcutter_production/gems/rubygems-update-1.3...
Exception `Gem::package::FormatError' at
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.r
b:112 - No metadata found!

Can you enter the following URL in your browser, download it to a
location and then try installing it?

http://gemcutter.org/gems/rubygems-update-1.3.5.gem

The downloaded file should weight 279K.

then, from the command line where you downloaded that file:

gem install rubygems-update-1.3.5.gem

If doesn't work, then you're behind a firewall or proxy that is
blocking all the Amazon S3 downloads and is downloading garbage that
RubyGems cannot install
 

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

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top