我有 2 个使用 RVM 的红宝石版本,我正在尝试删除我在这个红宝石中的所有宝石version 1.8.7-p302
首先我尝试了这个,但我得到了错误
➜ ~ gem list | cut -d" " -f1 | xargs gem uninstall -aIx
Successfully uninstalled actionmailer-2.3.5
Successfully uninstalled actionmailer-2.3.18
Successfully uninstalled actionpack-2.3.5
Successfully uninstalled actionpack-2.3.18
Successfully uninstalled activerecord-2.3.5
Successfully uninstalled activerecord-2.3.18
Successfully uninstalled activeresource-2.3.5
Successfully uninstalled activeresource-2.3.18
Successfully uninstalled activesupport-2.3.5
Successfully uninstalled activesupport-2.3.18
Removing bundle
Successfully uninstalled bundler-1.3.5
ERROR: While executing gem ... (Gem::InstallError)
cannot uninstall, check `gem list -d bundler-unload`
然后我尝试了这也是一个错误
➜ ~ gem list --no-version | xargs gem uninstall -aIx
zsh: correct 'gem' to '.gem' [nyae]? n
ERROR: While executing gem ... (Gem::InstallError)
cannot uninstall, check `gem list -d bundler`
我的宝石清单:
➜ ~ gem list
*** LOCAL GEMS ***
bundler (1.3.5)
bundler-unload (1.0.1)
declarative_authorization (0.5.1)
fattr (2.2.1)
i18n (0.4.2)
mysql (2.9.1, 2.8.1)
rack (1.1.6, 1.0.1)
rails (2.3.18, 2.3.5)
rake (10.1.0, 0.8.7)
rubygems-bundler (1.2.2)
rush (0.6.8)
rvm (1.11.3.8)
session (3.1.0)
sqlite3 (1.3.8)
更新:
我试图删除 ruby 1.8.7 然后安装它但是当我输入时宝石仍然存在我得到了这个
➜ ~ rvm gemset empty default
Are you SURE you wish to remove the installed gems for gemset 'ruby-1.8.7-p302' (/home/dexter/.rvm/gems/ruby-1.8.7-p302)?
(anything other than 'yes' will cancel) > yes
➜ ~ gem list
*** LOCAL GEMS ***
bundler (1.3.5)
bundler-unload (1.0.1)
rake (10.1.0)
rubygems-bundler (1.2.2)
rvm (1.11.3.8)
➜ ~ gem list --no-version | xargs gem uninstall -aIx
zsh: correct 'gem' to '.gem' [nyae]? n
INFO: gem "bundler" is not installed
INFO: gem "bundler-unload" is not installed
INFO: gem "rake" is not installed
INFO: gem "rubygems-bundler" is not installed
INFO: gem "rvm" is not installed
现在我不能再安装导轨了!
➜ ~ gem rails -v '2.3.5'
ERROR: While executing gem ... (RuntimeError)
Unknown command rails