运行时遇到错误:sudo -i gem pristine --all

时间:2014-05-20 12:22:07

标签: ruby-on-rails ruby

该命令在Fedora 20上运行。 我如何停止获取gem bigdecimal-1.2.0,因为我已经有了1.2.5。

输出

Restoring gems to pristine condition...
Restored actionmailer-4.1.1
Restored actionpack-4.1.1
Restored actionview-4.1.1
Restored activemodel-4.1.1
Restored activerecord-4.1.1
Restored activesupport-4.1.1
Restored arel-5.0.1.20140414130214
Building native extensions.  This could take a while...
Restored bigdecimal-1.2.5
Cached gem for bigdecimal-1.2.0 not found, attempting to fetch...
Fetching: bigdecimal-1.2.0.gem (100%)
ERROR:  While executing gem ... (Gem::InstallError)
    invalid gem: No such file or directory - /usr/share/gems/cache/bigdecimal-1.2.0.gem

2 个答案:

答案 0 :(得分:1)

这似乎有效:

sudo -i gem uninstall -i /usr/share/gems bigdecimal
Successfully uninstalled bigdecimal-1.2.0

重新运行

sudo -i gem pristine --all

我不再收到错误。

答案 1 :(得分:1)

就我而言,gem pristine --all(没有sudo)存在以下问题。

gem uninstall bigdecimal没有工作 gem uninstall -i ~/.rvm/gems/ruby-1.9.3-p545@global bigdecimal帮了解。