3

When using Python with pip we can specify an environment variable which says to also download the packages to a cache location: "How do I install from a local cache with pip?".

export PIP_DOWNLOAD_CACHE=$HOME/.pip_download_cache
pip install numpy

How can we do the same for bundler as well?

Community
  • 1
  • 1
tuxdna
  • 8,257
  • 4
  • 43
  • 61

1 Answers1

3

The gem command line tool automatically caches gems. From 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.

AlexMeng
  • 833
  • 8
  • 15
  • `gem pristine` takes advantage of the cache to rebuild gems. It's very convenient if you upgrade something in the system that breaks Ruby. – the Tin Man Dec 08 '14 at 05:01