{
    "mode": "man",
    "parameter": "bundle-add",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/bundle-add/1/json",
    "generated": "2026-07-05T13:03:02Z",
    "synopsis": "bundle   add   GEMNAME  [--group=GROUP]  [--version=VERSION]  [--source=SOURCE]  [--git=GIT]\n[--github=GITHUB] [--branch=BRANCH] [--ref=REF] [--skip-install] [--strict] [--optimistic]",
    "sections": {
        "NAME": {
            "content": "bundle-add - Add gem to the Gemfile and run bundle install\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "bundle   add   GEMNAME  [--group=GROUP]  [--version=VERSION]  [--source=SOURCE]  [--git=GIT]\n[--github=GITHUB] [--branch=BRANCH] [--ref=REF] [--skip-install] [--strict] [--optimistic]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Adds the named gem to the Gemfile and run bundle install. bundle install can  be  avoided  by\nusing the flag --skip-install.\n\nExample:\n\nbundle add rails\n\nbundle add rails --version \"< 3.0, > 1.1\"\n\nbundle  add  rails --version \"~> 5.0.0\" --source \"https://gems.example.com\" --group \"develop‐\nment\"\n\nbundle add rails --skip-install\n\nbundle add rails --group \"development, test\"\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "--version, -v\nSpecify version requirements(s) for the added gem.\n\n--group, -g\nSpecify the group(s) for the added gem. Multiple groups should be separated by commas.\n\n--source, , -s\nSpecify the source for the added gem.\n\n--git  Specify the git source for the added gem.\n",
            "subsections": [
                {
                    "name": "--github",
                    "content": "Specify the github source for the added gem.\n",
                    "long": "--github"
                },
                {
                    "name": "--branch",
                    "content": "Specify the git branch for the added gem.\n\n--ref  Specify the git ref for the added gem.\n",
                    "long": "--branch"
                },
                {
                    "name": "--skip-install",
                    "content": "Adds the gem to the Gemfile but does not install it.\n",
                    "long": "--skip-install"
                },
                {
                    "name": "--optimistic",
                    "content": "Adds optimistic declaration of version\n",
                    "long": "--optimistic"
                },
                {
                    "name": "--strict",
                    "content": "Adds strict declaration of version\n\n\n\n\nDecember 2021                              BUNDLE-ADD(1)",
                    "long": "--strict"
                }
            ]
        }
    },
    "summary": "bundle-add - Add gem to the Gemfile and run bundle install",
    "flags": [
        {
            "flag": "",
            "long": "--github",
            "arg": null,
            "description": "Specify the github source for the added gem."
        },
        {
            "flag": "",
            "long": "--branch",
            "arg": null,
            "description": "Specify the git branch for the added gem. --ref Specify the git ref for the added gem."
        },
        {
            "flag": "",
            "long": "--skip-install",
            "arg": null,
            "description": "Adds the gem to the Gemfile but does not install it."
        },
        {
            "flag": "",
            "long": "--optimistic",
            "arg": null,
            "description": "Adds optimistic declaration of version"
        },
        {
            "flag": "",
            "long": "--strict",
            "arg": null,
            "description": "Adds strict declaration of version December 2021 BUNDLE-ADD(1)"
        }
    ],
    "examples": [],
    "see_also": []
}