我如何安装本地宝石? [英] How can I install a local gem?
本文介绍了我如何安装本地宝石?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我将.gem文件下载到我的计算机中的文件夹中,我可以稍后使用 gem install
?
gem install 时,它会先搜索当前目录,所以如果你的.gem文件是那里,它会把它拿起来。我在宝石参考资料上找到了它,您可能也会发现它很方便:
gem install会安装名为
的宝石。它会尝试进行本地
安装(即
当前目录中的.gem文件),如果失败,
将尝试下载,
安装最新版本您需要的
宝石。
If I download a .gem file to a folder in my computer, can I install it later using gem install
?
解决方案
Yup, when you do gem install
, it will search the current directory first, so if your .gem file is there, it will pick it up. I found it on the gem reference, which you may find handy as well:
gem install will install the named gem. It will attempt a local installation (i.e. a .gem file in the current directory), and if that fails, it will attempt to download and install the most recent version of the gem you want.
这篇关于我如何安装本地宝石?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文