0

I'm getting this error when I'm trying to install padrino/sinatra gem.

$ gem install padrino
ERROR:  While executing gem ... (Gem::Package::FormatError)
    package metadata is missing in linecache19-0.5.13.gem
  • RUBYGEMS VERSION: 2.4.6
  • RUBY VERSION: 2.1.2 (2014-05-08 patchlevel 95) [x86_64-darwin14.0]

Tried the steps mentioned in this link as suggested. But still I'm getting same errors in following those steps.

$ curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    41  100    41    0     0     12      0  0:00:03  0:00:03 --:--:--    12

$curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    41  100    41    0     0     72      0 --:--:-- --:--:-- --:--:--    72

$ gem install linecache19-0.5.13.gem
ERROR:  While executing gem ... (Gem::Package::FormatError)
    package metadata is missing in /Users/nikhil.p/linecache19-0.5.13.gem
Community
  • 1
  • 1
Nikhil Patil
  • 457
  • 1
  • 7
  • 15
  • Did you try to install ``linecache19`` gem first? – dgilperez Feb 28 '15 at 12:34
  • Yes, I'm getting the same error no matter what gem I install. `$gem install linecache19 ERROR: While executing gem ... (Gem::Package::FormatError) package metadata is missing in linecache19-0.5.13.gem` – Nikhil Patil Feb 28 '15 at 14:15
  • possible duplicate of [how do I install ruby-debug in ruby 1.9.3 / Rails 3.2.1](http://stackoverflow.com/questions/9122232/how-do-i-install-ruby-debug-in-ruby-1-9-3-rails-3-2-1) – dgilperez Feb 28 '15 at 18:43
  • I checked that thread. But rubyforge.org is moved to rubygems.org and I couldn't find linecache19-0.5.13 on rubygems.org. The latest one available there is linecache19-0.5.12. I downloaded that gem, tried installing it and again I got the same error. – Nikhil Patil Mar 01 '15 at 06:15

1 Answers1

0

You probably want to add an -s to your curl, otherwise the output from the download progress could end up in the gem file, and confuse rubygem. When I download a gem using curl, I use:

curl -LsOw ${url_effective} https://docs.rubygems.org/downloads/gem-version.gem

That final argument (-w %{url_effective}) just outputs the final URL after all of the redirects. Sometimes helpful.

etsauer
  • 347
  • 2
  • 6
  • 12