如何安装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.

上一篇:ruby-on-rails-3 – Rails Nginx Passenger由于发生了产生错误,因此无法结帐会话


下一篇:ANSA二次开发 - 在ANSA中导入外部Python库