{
    "content": [
        {
            "type": "text",
            "text": "# BUNDLE-CACHE (man)\n\n## NAME\n\nbundle-cache - Package your needed .gem files into your application\n\n## DESCRIPTION\n\nCopy  all of the .gem files needed to run the application into the vendor/cache directory. In\nthe future, when running [bundle install(1)][bundle-install], use the gems in  the  cache  in\npreference to the ones on rubygems.org.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS** (1 subsections)\n- **DESCRIPTION**\n- **GIT AND PATH GEMS**\n- **SUPPORT FOR MULTIPLE PLATFORMS**\n- **REMOTE FETCHING**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "BUNDLE-CACHE",
        "section": "",
        "mode": "man",
        "summary": "bundle-cache - Package your needed .gem files into your application",
        "synopsis": "",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "bundle cache",
                        "lines": 1
                    }
                ]
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "GIT AND PATH GEMS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SUPPORT FOR MULTIPLE PLATFORMS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "REMOTE FETCHING",
                "lines": 43,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "bundle-cache - Package your needed .gem files into your application\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "",
                "subsections": [
                    {
                        "name": "bundle cache",
                        "content": ""
                    }
                ]
            },
            "DESCRIPTION": {
                "content": "Copy  all of the .gem files needed to run the application into the vendor/cache directory. In\nthe future, when running [bundle install(1)][bundle-install], use the gems in  the  cache  in\npreference to the ones on rubygems.org.\n",
                "subsections": []
            },
            "GIT AND PATH GEMS": {
                "content": "The  bundle  cache  command  can also package :git and :path dependencies besides .gem files.\nThis needs to be explicitly enabled via the --all option. Once used, the --all option will be\nremembered.\n",
                "subsections": []
            },
            "SUPPORT FOR MULTIPLE PLATFORMS": {
                "content": "When  using  gems  that  have  different  packages  for different platforms, Bundler supports\ncaching of gems for other platforms where the Gemfile has been resolved (i.e. present in  the\nlockfile) in vendor/cache. This needs to be enabled via the --all-platforms option. This set‐\nting will be remembered in your local bundler configuration.\n",
                "subsections": []
            },
            "REMOTE FETCHING": {
                "content": "By default,  if  you  run  bundle  install(1)](bundle-install.1.html)  after  running  bundle\ncache(1)  bundle-cache.1.html,  bundler will still connect to rubygems.org to check whether a\nplatform-specific gem exists for any of the gems in vendor/cache.\n\nFor instance, consider this Gemfile(5):\n\n\n\nsource \"https://rubygems.org\"\n\ngem \"nokogiri\"\n\n\n\nIf you run bundle cache under C Ruby, bundler will retrieve the version of nokogiri  for  the\n\"ruby\" platform. If you deploy to JRuby and run bundle install, bundler is forced to check to\nsee whether a \"java\" platformed nokogiri exists.\n\nEven though the nokogiri gem for the Ruby platform is technically acceptable on JRuby, it has\na  C  extension that does not run on JRuby. As a result, bundler will, by default, still con‐\nnect to rubygems.org to check whether it has a version of one of your gems more  specific  to\nyour platform.\n\nThis  problem is also not limited to the \"java\" platform. A similar (common) problem can hap‐\npen when developing on Windows and deploying to Linux, or even when developing on OSX and de‐\nploying to Linux.\n\nIf  you know for sure that the gems packaged in vendor/cache are appropriate for the platform\nyou are on, you can run bundle install --local to skip checking for  more  appropriate  gems,\nand use the ones in vendor/cache.\n\nOne  way  to  be  sure that you have the right platformed versions of all your gems is to run\nbundle cache on an identical machine and check in the gems. For instance, you can run  bundle\ncache  on an identical staging box during your staging process, and check in the vendor/cache\nbefore deploying to production.\n\nBy default, bundle cache(1) bundle-cache.1.html fetches and also installs the gems to the de‐\nfault  location.  To  package the dependencies to vendor/cache without installing them to the\nlocal install location, you can run bundle cache --no-install.\n\n\n\nDecember 2021                            BUNDLE-CACHE(1)",
                "subsections": []
            }
        }
    }
}