我有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`
我Gemlist:
➜ ~ 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)
更新:
我试图删除红宝石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
我没有使用宝石! ,我所做的只是安装一个红宝石版本1.8.7然后gem install rails -v 2.3.5 –
请参阅我的文章的补充 - 您应该清空默认的gemset。 – 7stud
如果您切换到ruby的版本'$ rvm use 1.8.7-p302',那么执行'$ rvm gemset list',您会看到该版本的所有gemset。默认和全局gemsets会自动为您创建。你可能不应该删除它们。如果您切换到gemset'$ rvm gemset use mygemsA',您可以通过执行'$ gem list'来查看gemset中的所有宝石。这将允许您确认您的所有宝石是否进入了默认的宝石镶嵌。 – 7stud