[英]How to “re-install” a gem?
Question is pretty simple so instead of writting two commands is there one substitute? 问题很简单,所以有一个替代品,而不是写两个命令? eg
例如
gem uninstall subexec
gem install subexec
Is there just re-install, or something similar? 是否只是重新安装,或类似的东西?
Depending on what you're trying to achieve, the following restores the gem to the contents of the .gem
file: 根据您要实现的目标,以下内容将gem恢复为
.gem
文件的内容:
gem pristine <gem name here>
You can also run that with --all
if you want to clean your entire set of installed gems. 如果要清理整套已安装的宝石,也可以使用
--all
运行它。
No, there's no such command. 不,没有这样的命令。 You can, however, fit them on one line, if that's what you seek.
但是,你可以将它们放在一条线上,如果这就是你所寻求的。
gem uninstall subexec && gem install subexec
Nope, you have to do an uninstall and install. 不,你必须卸载并安装。
http://docs.rubygems.org/read/book/2 http://docs.rubygems.org/read/book/2
如果您使用bundler进行gem安装,那么您需要做的就是编辑gemfile然后运行bundle install。
gem update <gem-name>
would update to latest available version. 将更新到最新的可用版本。 or
要么
gem update
would update all gems to latest versions. 会将所有宝石更新为最新版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.