{
    "mode": "man",
    "parameter": "bundle-config",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/bundle-config/1/json",
    "generated": "2026-05-30T06:05:47Z",
    "synopsis": "bundle config [list|get|set|unset] [name [value]]",
    "sections": {
        "NAME": {
            "content": "bundle-config - Set bundler configuration options\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "bundle config [list|get|set|unset] [name [value]]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This command allows you to interact with Bundler´s configuration system.\n\nBundler loads configuration settings in this order:\n\n1.  Local config (<projectroot>/.bundle/config or $BUNDLEAPPCONFIG/config)\n\n2.  Environmental variables (ENV)\n\n3.  Global config (~/.bundle/config)\n\n4.  Bundler default config\n\n\n\nExecuting bundle config list with will print a list of all bundler configuration for the cur‐\nrent bundle, and where that configuration was set.\n\nExecuting bundle config get <name> will print the value of that  configuration  setting,  and\nwhere it was set.\n\nExecuting bundle config set <name> <value> will set that configuration to the value specified\nfor all bundles executed as the current user. The configuration will  be  stored  in  ~/.bun‐‐\ndle/config. If name already is set, name will be overridden and user will be warned.\n\nExecuting bundle config set --global <name> <value> works the same as above.\n\nExecuting  bundle config set --local <name> <value> will set that configuration in the direc‐\ntory for the local application. The configuration  will  be  stored  in  <projectroot>/.bun‐‐\ndle/config. If BUNDLEAPPCONFIG is set, the configuration will be stored in $BUNDLEAPPCON‐‐\nFIG/config.\n\nExecuting bundle config unset <name> will delete the configuration in both local  and  global\nsources.\n\nExecuting  bundle  config  unset  --global <name> will delete the configuration only from the\nuser configuration.\n\nExecuting bundle config unset --local <name> <value> will delete the configuration only  from\nthe local application.\n\nExecuting  bundle with the BUNDLEIGNORECONFIG environment variable set will cause it to ig‐\nnore all configuration.\n",
            "subsections": []
        },
        "REMEMBERING OPTIONS": {
            "content": "Flags passed to bundle install or the Bundler runtime, such as --path foo or  --without  pro‐‐\nduction,  are remembered between commands and saved to your local application´s configuration\n(normally, ./.bundle/config).\n\nHowever, this will be changed in bundler 3, so it´s better not to rely on this  behavior.  If\nthese  options  must be remembered, it´s better to set them using bundle config (e.g., bundle\nconfig set --local path foo).\n\nThe options that can be configured are:\n\nbin    Creates a directory (defaults to ~/bin) and place any executables from the gem  there.\nThese  executables  run in Bundler´s context. If used, you might add this directory to\nyour environment´s PATH variable. For instance, if the rails gem comes  with  a  rails\nexecutable,  this  flag  will  create a bin/rails executable that ensures that all re‐\nferred dependencies will be resolved using the bundled gems.\n",
            "subsections": [
                {
                    "name": "deployment",
                    "content": "In deployment mode, Bundler will ´roll-out´ the  bundle  for  production  use.  Please\ncheck  carefully  if you want to have this option enabled in development or test envi‐\nronments.\n\npath   The location to install the specified gems to. This  defaults  to  Rubygems´  setting.\nBundler  shares  this  location with Rubygems, gem install ... will have gem installed\nthere, too. Therefore, gems installed without a --path ... setting  will  show  up  by\ncalling gem list. Accordingly, gems installed to other locations will not get listed.\n"
                },
                {
                    "name": "without",
                    "content": "A space-separated list of groups referencing gems to skip during installation.\n\nwith   A space-separated list of groups referencing gems to include during installation.\n"
                }
            ]
        },
        "BUILD OPTIONS": {
            "content": "You  can  use bundle config to give Bundler the flags to pass to the gem installer every time\nbundler tries to install a particular gem.\n\nA very common example, the mysql gem, requires Snow Leopard users to pass configuration flags\nto gem install to specify where to find the mysqlconfig executable.\n\n\n\ngem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysqlconfig\n\n\n\nSince  the  specific  location of that executable can change from machine to machine, you can\nspecify these flags on a per-machine basis.\n\n\n\nbundle config set --global build.mysql --with-mysql-config=/usr/local/mysql/bin/mysqlconfig\n\n\n\nAfter running this command, every time bundler needs to install the mysql gem, it  will  pass\nalong the flags you specified.\n",
            "subsections": []
        },
        "CONFIGURATION KEYS": {
            "content": "Configuration keys in bundler have two forms: the canonical form and the environment variable\nform.\n\nFor instance, passing the --without flag to bundle install(1) bundle-install.1.html  prevents\nBundler  from  installing  certain  groups specified in the Gemfile(5). Bundler persists this\nvalue in app/.bundle/config so that calls to Bundler.setup do not try to find gems  from  the\nGemfile  that  you  didn´t  install. Additionally, subsequent calls to bundle install(1) bun‐\ndle-install.1.html remember this setting and skip those groups.\n\nThe canonical form of this configuration is \"without\". To convert the canonical form  to  the\nenvironment  variable form, capitalize it, and prepend BUNDLE. The environment variable form\nof \"without\" is BUNDLEWITHOUT.\n\nAny periods in the configuration keys must be replaced with two underscores when  setting  it\nvia  environment variables. The configuration key local.rack becomes the environment variable\nBUNDLELOCALRACK.\n",
            "subsections": []
        },
        "LIST OF AVAILABLE KEYS": {
            "content": "The following is a list of all configuration keys and their purpose. You can learn more about\ntheir operation in bundle install(1) bundle-install.1.html.\n\n•   allowdeploymentsourcecredentialchanges        (BUNDLEALLOWDEPLOYMENTSOURCECREDEN‐‐\nTIALCHANGES): When in deployment mode, allow changing the credentials to a gem´s source.\nEx:          https://some.host.com/gems/path/          ->         https://username:pass‐‐\nword@some.host.com/gems/path\n\n•   allowofflineinstall (BUNDLEALLOWOFFLINEINSTALL): Allow Bundler to  use  cached  data\nwhen installing without network access.\n\n•   autocleanwithoutpath  (BUNDLEAUTOCLEANWITHOUTPATH): Automatically run bundle clean\nafter installing when an explicit path has not been set and  Bundler  is  not  installing\ninto the system gems.\n\n•   autoinstall  (BUNDLEAUTOINSTALL): Automatically run bundle install when gems are miss‐\ning.\n\n•   bin (BUNDLEBIN): Install executables from gems in the bundle to the specified directory.\nDefaults to false.\n\n•   cacheall  (BUNDLECACHEALL): Cache all gems, including path and git gems. This needs to\nbe explicitly configured on bundler 1 and bundler 2, but will be the default  on  bundler\n3.\n\n•   cacheallplatforms (BUNDLECACHEALLPLATFORMS): Cache gems for all platforms.\n\n•   cachepath (BUNDLECACHEPATH): The directory that bundler will place cached gems in when\nrunning bundle package, and that bundler will look in when installing gems.  Defaults  to\nvendor/cache.\n\n•   clean  (BUNDLECLEAN): Whether Bundler should run bundle clean automatically after bundle\ninstall.\n\n•   console (BUNDLECONSOLE): The console that bundle console starts. Defaults to irb.\n\n•   defaultinstallusespath (BUNDLEDEFAULTINSTALLUSESPATH): Whether  a  bundle  install\nwithout an explicit --path argument defaults to installing gems in .bundle.\n\n•   deployment  (BUNDLEDEPLOYMENT):  Disallow  changes  to  the Gemfile. When the Gemfile is\nchanged and the lockfile has not been updated, running Bundler commands will be blocked.\n\n•   disablechecksumvalidation (BUNDLEDISABLECHECKSUMVALIDATION): Allow  installing  gems\neven if they do not match the checksum provided by RubyGems.\n\n•   disableexecload  (BUNDLEDISABLEEXECLOAD):  Stop Bundler from using load to launch an\nexecutable in-process in bundle exec.\n\n•   disablelocalbranchcheck (BUNDLEDISABLELOCALBRANCHCHECK): Allow Bundler  to  use  a\nlocal git override without a branch specified in the Gemfile.\n\n•   disablelocalrevisioncheck  (BUNDLEDISABLELOCALREVISIONCHECK): Allow Bundler to use\na local git override without checking if the revision present in the lockfile is  present\nin the repository.\n\n•   disablesharedgems  (BUNDLEDISABLESHAREDGEMS):  Stop  Bundler from accessing gems in‐\nstalled to RubyGems´ normal location.\n\n•   disableversioncheck (BUNDLEDISABLEVERSIONCHECK): Stop Bundler  from  checking  if  a\nnewer Bundler version is available on rubygems.org.\n\n•   forcerubyplatform  (BUNDLEFORCERUBYPLATFORM):  Ignore the current machine´s platform\nand install only ruby platform gems. As a result, gems with  native  extensions  will  be\ncompiled from source.\n\n•   frozen  (BUNDLEFROZEN): Disallow changes to the Gemfile. When the Gemfile is changed and\nthe lockfile has not been updated, running Bundler commands will be blocked. Defaults  to\ntrue when --deployment is used.\n\n•   gem.githubusername (BUNDLEGEMGITHUBUSERNAME): Sets a GitHub username or organization\nto be used in README file when you create a new gem via bundle gem  command.  It  can  be\noverridden by passing an explicit --github-username flag to bundle gem.\n\n•   gem.pushkey (BUNDLEGEMPUSHKEY): Sets the --key parameter for gem push when using the\nrake release command with a private gemstash server.\n\n•   gemfile (BUNDLEGEMFILE): The name of the file that bundler should use  as  the  Gemfile.\nThis  location  of  this file also sets the root of the project, which is used to resolve\nrelative paths in the Gemfile, among other things. By default,  bundler  will  search  up\nfrom the current working directory until it finds a Gemfile.\n\n•   globalgemcache  (BUNDLEGLOBALGEMCACHE):  Whether Bundler should cache all gems glob‐\nally, rather than locally to the installing Ruby installation.\n\n•   ignoremessages (BUNDLEIGNOREMESSAGES): When set, no  post  install  messages  will  be\nprinted. To silence a single gem, use dot notation like ignoremessages.httparty true.\n\n•   initgemsrb  (BUNDLEINITGEMSRB): Generate a gems.rb instead of a Gemfile when running\nbundle init.\n\n•   jobs (BUNDLEJOBS): The number of gems Bundler can install in parallel. Defaults  to  the\nnumber of available processors.\n\n•   noinstall (BUNDLENOINSTALL): Whether bundle package should skip installing gems.\n\n•   noprune  (BUNDLENOPRUNE):  Whether  Bundler  should  leave outdated gems unpruned when\ncaching.\n\n•   path (BUNDLEPATH): The location on disk where all gems in your bundle  will  be  located\nregardless  of $GEMHOME or $GEMPATH values. Bundle gems not found in this location will\nbe installed by bundle install. Defaults to Gem.dir. When --deployment is used,  defaults\nto vendor/bundle.\n\n•   path.system  (BUNDLEPATHSYSTEM):  Whether  Bundler  will install gems into the default\nsystem path (Gem.dir).\n\n•   pathrelativetocwd (BUNDLEPATHRELATIVETOCWD) Makes --path relative to the  CWD  in‐\nstead of the Gemfile.\n\n•   plugins (BUNDLEPLUGINS): Enable Bundler´s experimental plugin system.\n\n•   preferpatch (BUNDLEPREFERPATCH): Prefer updating only to next patch version during up‐\ndates. Makes bundle update calls equivalent to bundler update --patch.\n\n•   printonlyversionnumber (BUNDLEPRINTONLYVERSIONNUMBER): Print only  version  number\nfrom bundler --version.\n\n•   redirect  (BUNDLEREDIRECT):  The  number  of redirects allowed for network requests. De‐\nfaults to 5.\n\n•   retry (BUNDLERETRY): The number of times to retry failed network requests.  Defaults  to\n3.\n\n•   setupmakeskernelgempublic  (BUNDLESETUPMAKESKERNELGEMPUBLIC): Have Bundler.setup\nmake the Kernel#gem method public, even though RubyGems declares it as private.\n\n•   shebang (BUNDLESHEBANG): The program name that should be invoked for generated binstubs.\nDefaults to the ruby install name used to generate the binstub.\n\n•   silencedeprecations (BUNDLESILENCEDEPRECATIONS): Whether Bundler should silence depre‐\ncation warnings for behavior that will be changed in the next major version.\n\n•   silencerootwarning (BUNDLESILENCEROOTWARNING): Silence the  warning  Bundler  prints\nwhen installing gems as root.\n\n•   sslcacert (BUNDLESSLCACERT): Path to a designated CA certificate file or folder con‐\ntaining multiple certificates for trusted CAs in PEM format.\n\n•   sslclientcert (BUNDLESSLCLIENTCERT): Path to a designated file  containing  a  X.509\nclient certificate and key in PEM format.\n\n•   sslverifymode  (BUNDLESSLVERIFYMODE):  The  SSL  verification mode Bundler uses when\nmaking HTTPS requests. Defaults to verify peer.\n\n•   suppressinstallusingmessages (BUNDLESUPPRESSINSTALLUSINGMESSAGES): Avoid  printing\nUsing ... messages during installation when the version of a gem has not changed.\n\n•   systembindir  (BUNDLESYSTEMBINDIR): The location where RubyGems installs binstubs. De‐\nfaults to Gem.bindir.\n\n•   timeout (BUNDLETIMEOUT): The seconds allowed before timing out for network requests. De‐\nfaults to 10.\n\n•   updaterequiresallflag (BUNDLEUPDATEREQUIRESALLFLAG): Require passing --all to bun‐‐\ndle update when everything should be updated, and disallow passing no options  to  bundle\nupdate.\n\n•   useragent  (BUNDLEUSERAGENT):  The  custom user agent fragment Bundler includes in API\nrequests.\n\n•   with (BUNDLEWITH): A :-separated list of groups whose gems bundler should install.\n\n•   without (BUNDLEWITHOUT): A :-separated list of groups whose gems bundler should not  in‐\nstall.\n\n\n\nIn general, you should set these settings per-application by using the applicable flag to the\nbundle install(1) bundle-install.1.html or bundle package(1) bundle-package.1.html command.\n\nYou can set them globally either via environment variables or  bundle  config,  whichever  is\npreferable  for  your setup. If you use both, environment variables will take preference over\nglobal settings.\n",
            "subsections": []
        },
        "LOCAL GIT REPOS": {
            "content": "Bundler also allows you to work against a git repository locally instead of using the  remote\nversion. This can be achieved by setting up a local override:\n\n\n\nbundle config set --local local.GEMNAME /path/to/local/git/repository\n\n\n\nFor example, in order to use a local Rack repository, a developer could call:\n\n\n\nbundle config set --local local.rack ~/Work/git/rack\n\n\n\nNow instead of checking out the remote git repository, the local override will be used. Simi‐\nlar to a path source, every time the local git repository change, changes will  be  automati‐\ncally  picked  up by Bundler. This means a commit in the local git repo will update the revi‐\nsion in the Gemfile.lock to the local git repo revision. This requires the same attention  as\ngit  submodules.  Before  pushing  to  the  remote, you need to ensure the local override was\npushed, otherwise you may point to a commit that only exists in your  local  machine.  You´ll\nalso need to CGI escape your usernames and passwords as well.\n\nBundler  does  many checks to ensure a developer won´t work with invalid references. Particu‐\nlarly, we force a developer to specify a branch in the Gemfile in order to use this  feature.\nIf  the branch specified in the Gemfile and the current branch in the local git repository do\nnot match, Bundler will abort. This ensures that a developer is always  working  against  the\ncorrect branches, and prevents accidental locking to a different branch.\n\nFinally, Bundler also ensures that the current revision in the Gemfile.lock exists in the lo‐\ncal git repository. By doing this, Bundler forces you to fetch the latest changes in the  re‐\nmotes.\n",
            "subsections": []
        },
        "MIRRORS OF GEM SOURCES": {
            "content": "Bundler  supports  overriding  gem  sources  with  mirrors.  This  allows  you  to  configure\nrubygems.org as the gem source in your Gemfile while still using your mirror to fetch gems.\n\n\n\nbundle config set --global mirror.SOURCEURL MIRRORURL\n\n\n\nFor example, to use a mirror of rubygems.org hosted at rubygems-mirror.org:\n\n\n\nbundle config set --global mirror.http://rubygems.org http://rubygems-mirror.org\n\n\n\nEach mirror also provides a fallback timeout setting. If the mirror does not  respond  within\nthe fallback timeout, Bundler will try to use the original server instead of the mirror.\n\n\n\nbundle config set --global mirror.SOURCEURL.fallbacktimeout TIMEOUT\n\n\n\nFor example, to fall back to rubygems.org after 3 seconds:\n\n\n\nbundle config set --global mirror.https://rubygems.org.fallbacktimeout 3\n\n\n\nThe  default fallback timeout is 0.1 seconds, but the setting can currently only accept whole\nseconds (for example, 1, 15, or 30).\n",
            "subsections": []
        },
        "CREDENTIALS FOR GEM SOURCES": {
            "content": "Bundler allows you to configure credentials for any gem source, which  allows  you  to  avoid\nputting secrets into your Gemfile.\n\n\n\nbundle config set --global SOURCEHOSTNAME USERNAME:PASSWORD\n\n\n\nFor  example,  to  save  the credentials of user claudette for the gem source at gems.longer‐‐\nous.com, you would run:\n\n\n\nbundle config set --global gems.longerous.com claudette:s00pers3krit\n\n\n\nOr you can set the credentials as an environment variable like this:\n\n\n\nexport BUNDLEGEMSLONGEROUSCOM=\"claudette:s00pers3krit\"\n\n\n\nFor gems with a git source with HTTP(S) URL you can specify credentials like so:\n\n\n\nbundle config set --global https://github.com/rubygems/rubygems.git username:password\n\n\n\nOr you can set the credentials as an environment variable like so:\n\n\n\nexport BUNDLEGITHUBCOM=username:password\n\n\n\nThis is especially useful for private repositories on hosts such as GitHub, where you can use\npersonal OAuth tokens:\n\n\n\nexport BUNDLEGITHUBCOM=abcd0123generatedtoken:x-oauth-basic\n\n\n\nNote  that any configured credentials will be redacted by informative commands such as bundle\nconfig list or bundle config get, unless you use the --parseable flag. This is to avoid unin‐\ntentionally leaking credentials when copy-pasting bundler output.\n\nAlso note that to guarantee a sane mapping between valid environment variable names and valid\nhost names, bundler makes the following transformations:\n\n•   Any - characters in a host name are mapped to a triple dash ()  in  the  corresponding\nenvironment variable.\n\n•   Any . characters in a host name are mapped to a double dash () in the corresponding en‐\nvironment variable.\n\n\n\nThis means that if you have a gem server named my.gem-host.com, you´ll need to use  the  BUN‐‐\nDLEMYGEMHOSTCOM variable to configure credentials for it through ENV.\n",
            "subsections": []
        },
        "CONFIGURE BUNDLER DIRECTORIES": {
            "content": "Bundler´s  home, config, cache and plugin directories are able to be configured through envi‐\nronment variables. The default location for Bundler´s home directory is ~/.bundle, which  all\ndirectories  inherit  from by default. The following outlines the available environment vari‐\nables and their default values\n\n\n\nBUNDLEUSERHOME : $HOME/.bundle\nBUNDLEUSERCACHE : $BUNDLEUSERHOME/cache\nBUNDLEUSERCONFIG : $BUNDLEUSERHOME/config\nBUNDLEUSERPLUGIN : $BUNDLEUSERHOME/plugin\n\n\n\n\n\n\nDecember 2021                           BUNDLE-CONFIG(1)",
            "subsections": []
        }
    },
    "summary": "bundle-config - Set bundler configuration options",
    "flags": [],
    "examples": [],
    "see_also": []
}