编程语言
首页 > 编程语言> > 如何安装Ruby Gems,并一路将其缓存?

如何安装Ruby Gems,并一路将其缓存?

作者:互联网

当将Python与pip一起使用时,我们可以指定一个环境变量,该变量表示还将包下载到缓存位置:“ How do I install from a local cache with pip?”.

export PIP_DOWNLOAD_CACHE=$HOME/.pip_download_cache
pip install numpy

我们如何对捆绑器也做同样的事情?

解决方法:

gem命令行工具会自动缓存gem.从the documentation开始:

Gem::Installer does the work of putting files in all the right places on the filesystem including unpacking the gem into its gem dir, installing the gemspec in the specifications dir, storing the cached gem in the cache dir, and installing either wrappers or symlinks for executables.

标签:caching,bundler,installation,ruby,python
来源: https://codeday.me/bug/20191121/2048145.html