当我尝试安装padrino / sinatra gem时,我收到此错误。
$ gem install padrino
ERROR: While executing gem ... (Gem::Package::FormatError)
package metadata is missing in linecache19-0.5.13.gem
按照建议尝试了此link中提到的步骤。但是我仍然在遵循这些步骤时遇到同样的错误。
$ 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
答案 0 :(得分:0)
您可能希望在curl中添加-s,否则下载进度的输出可能会在gem文件中结束,并且会混淆rubygem。当我使用curl下载gem时,我使用:
keypress
最后一个参数(-w%{url_effective})只是在所有重定向后输出最终的URL。有时很有用。