Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Thursday, June 13, 2019
 
 

bundle-config (1)

Name

bundle-config - :password fi IP "" 0 P Or you can set the credentials as an

Synopsis

Please see following description for synopsis

Description

TH  "BUNDLE-CONFIG"  "1"  "December  2018"  ""  "" SH "NAME" bun-
dle-config - Set bundler configuration options SH "SYNOPSIS" bun-
dle  config  [name  [value]] SH "DESCRIPTION" This command allows
you to interact with Bundler's configuration system.   P  Bundler
loads  configuration settings in this order: IP "1." 4 Local con-
fig (app/.bundle/config) IP "2." 4 Environmental variables  (ENV)
IP  "3." 4 Global config (~/.bundle/config) IP "4." 4 Bundler de-
fault config IP "" 0 P Executing bundle config with no parameters
will  print  a  list of all bundler configuration for the current
bundle, and where that configuration was set.  P Executing bundle
config <name> will print the value of that configuration setting,
and where it was set.  P Executing bundle config  <name>  <value>
will  set  that configuration to the value specified for all bun-
dles executed as the current  user.  The  configuration  will  be
stored  in ~/.bundle/config. If name already is set, name will be
overridden and user will be warned.  P  Executing  bundle  config
--global  <name>  <value>  works  the same as above.  P Executing
bundle config --local <name> <value> will set that  configuration
to  the  local  application.  The configuration will be stored in
app/.bundle/config.  P Executing bundle  config  --delete  <name>
will  delete  the configuration in both local and global sources.
Not compatible with --global or --local flag.  P Executing bundle
with the BUNDLE_IGNORE_CONFIG environment variable set will cause
it to ignore all configuration.  P Executing bundle  config  dis-
able_multisource true upgrades the warning about the Gemfile con-
taining multiple primary sources to an  error.  Executing  bundle
config  --delete  disable_multisource  downgrades this error to a
warning.  SH "REMEMBERING OPTIONS" Flags passed to bundle install
or  the  Bundler runtime, such as --path foo or --without produc-
tion, are not remembered between commands. If these options  must
be  remembered,they must be set using bundle config (e.g., bundle
config path foo).  P The options that can be configured  are:  TP
bin  Creates  a  directory (defaults to ~/bin) and place any exe-
cutables from the gem there. These executables run  in  Bundler's
context.  If  used, you might add this directory to your environ-
ment's PATH variable. For instance, if the rails gem comes with a
rails  executable,  this  flag will create a bin/rails executable
that ensures that all referred dependencies will be resolved  us-
ing  the bundled gems.  TP deployment In deployment mode, Bundler
will 'roll-out' the bundle for production use. Please check care-
fully  if  you want to have this option enabled in development or
test environments.  TP path The location to install the specified
gems  to. This defaults to Rubygems' setting. Bundler shares this
location with Rubygems, gem install ... will have  gem  installed
there,  too.  Therefore, gems installed without a --path ... set-
ting will show up by calling  gem  list.  Accordingly,  gems  in-
stalled  to  other  locations  will not get listed.  TP without A
space-separated list of groups referencing gems  to  skip  during
installation.  TP with A space-separated list of groups referenc-
ing gems to include during installation.  SH "BUILD OPTIONS"  You
can  use  bundle  config to give Bundler the flags to pass to the
gem installer every time bundler tries to  install  a  particular
gem.  P A very common example, the mysql gem, requires Snow Leop-
ard users to pass configuration flags to gem install  to  specify
where to find the mysql_config executable.  IP "" 4 nf

gem     install     mysql     --     --with-mysql-config=/usr/lo-
cal/mysql/bin/mysql_config fi IP "" 0 P Since the specific  loca-
tion  of  that executable can change from machine to machine, you
can specify these flags on a per-machine basis.  IP "" 4 nf

bundle    config     build.mysql     --with-mysql-config=/usr/lo-
cal/mysql/bin/mysql_config  fi  IP "" 0 P After running this com-
mand, every time bundler needs to install the mysql gem, it  will
pass along the flags you specified.  SH "CONFIGURATION KEYS" Con-
figuration keys in bundler have two forms: the canonical form and
the  environment  variable  form.   P  For  instance, passing the
--without flag to bundle  install(1)  bundle-install.1.html  pre-
vents  Bundler  from  installing  certain groups specified in the
Gemfile(5). Bundler persists this value in app/.bundle/config  so
that calls to Bundler.setup do not try to find gems from the Gem-
file that you didn't install. Additionally, subsequent  calls  to
bundle install(1) bundle-install.1.html remember this setting and
skip those groups.  P The canonical form of this configuration is
"without". To convert the canonical form to the environment vari-
able form, capitalize it, and prepend  BUNDLE_.  The  environment
variable  form  of "without" is BUNDLE_WITHOUT.  P Any periods in
the configuration keys must be replaced with two underscores when
setting  it  via environment variables. The configuration key lo-
cal.rack becomes the environment variable BUNDLE_LOCAL__RACK.  SH
"LIST  OF AVAILABLE KEYS" The following is a list of all configu-
ration keys and their purpose. You can learn more about their op-
eration in bundle install(1) bundle-install.1.html.  IP "o" 4 al-
low_bundler_dependency_conflicts  (BUNDLE_ALLOW_BUNDLER_DEPENDEN-
CY_CONFLICTS): Allow resolving to specifications that have depen-
dencies on bundler that are incompatible with the running Bundler
version.   IP  "o"  4  allow_deployment_source_credential_changes
(BUNDLE_ALLOW_DEPLOYMENT_SOURCE_CREDENTIAL_CHANGES): When in  de-
ployment  mode, allow changing the credentials to a gem's source.
Ex: https://some.host.com/gems/path/  ->  https://user_name:pass-
word@some.host.com/gems/path IP "o" 4 allow_offline_install (BUN-
DLE_ALLOW_OFFLINE_INSTALL): Allow Bundler to use cached data when
installing  without  network  access.   IP "o" 4 auto_clean_with-
out_path (BUNDLE_AUTO_CLEAN_WITHOUT_PATH): Automatically run bun-
dle clean after installing when an explicit path has not been set
and Bundler is not installing into the system gems.  IP "o" 4 au-
to_install  (BUNDLE_AUTO_INSTALL):  Automatically  run bundle in-
stall when gems are missing.  IP "o" 4 bin (BUNDLE_BIN):  Install
executables  from  gems in the bundle to the specified directory.
Defaults to false.  IP "o" 4 cache_all (BUNDLE_CACHE_ALL):  Cache
all  gems, including path and git gems.  IP "o" 4 cache_all_plat-
forms (BUNDLE_CACHE_ALL_PLATFORMS): Cache gems for all platforms.
IP  "o"  4  cache_path  (BUNDLE_CACHE_PATH):  The  directory that
bundler will place cached gems in when  running  bundle  package,
and  that  bundler will look in when installing gems. Defaults to
vendor/bundle.  IP "o" 4 clean  (BUNDLE_CLEAN):  Whether  Bundler
should  run  bundle clean automatically after bundle install.  IP
"o" 4 console (BUNDLE_CONSOLE): The console that  bundle  console
starts.  Defaults  to  irb.   IP  "o" 4 default_install_uses_path
(BUNDLE_DEFAULT_INSTALL_USES_PATH):  Whether  a  bundle   install
without  an  explicit --path argument defaults to installing gems
in .bundle.  IP "o" 4  deployment  (BUNDLE_DEPLOYMENT):  Disallow
changes to the Gemfile. When the Gemfile is changed and the lock-
file has not been  updated,  running  Bundler  commands  will  be
blocked.    IP  "o"  4  disable_checksum_validation  (BUNDLE_DIS-
ABLE_CHECKSUM_VALIDATION): Allow installing gems even if they  do
not  match  the  checksum  provided  by  RubyGems.  IP "o" 4 dis-
able_exec_load (BUNDLE_DISABLE_EXEC_LOAD): Stop Bundler from  us-
ing  load  to launch an executable in-process in bundle exec.  IP
"o"     4     disable_local_branch_check      (BUNDLE_DISABLE_LO-
CAL_BRANCH_CHECK):  Allow  Bundler  to  use  a local git override
without a branch specified in the Gemfile.  IP "o" 4 disable_mul-
tisource  (BUNDLE_DISABLE_MULTISOURCE):  When  set, Gemfiles con-
taining multiple sources will produce errors instead of warnings.
Use  bundle config --delete disable_multisource to unset.  IP "o"
4  disable_platform_warnings  (BUNDLE_DISABLE_PLATFORM_WARNINGS):
Disable  warnings  during bundle install when a dependency is un-
used on the current platform.  IP "o" 4 disable_shared_gems (BUN-
DLE_DISABLE_SHARED_GEMS):  Stop  Bundler  from accessing gems in-
stalled to RubyGems' normal  location.   IP  "o"  4  disable_ver-
sion_check   (BUNDLE_DISABLE_VERSION_CHECK):  Stop  Bundler  from
checking if a newer Bundler version is available on rubygems.org.
IP  "o" 4 error_on_stderr (BUNDLE_ERROR_ON_STDERR): Print Bundler
errors to stderr.  IP "o" 4 force_ruby_platform (BUNDLE_FORCE_RU-
BY_PLATFORM):  Ignore  the current machine's platform and install
only ruby platform gems. As a result, gems with native extensions
will  be  compiled from source.  IP "o" 4 frozen (BUNDLE_FROZEN):
Disallow changes to the Gemfile. When the Gemfile is changed  and
the  lockfile has not been updated, running Bundler commands will
be blocked. Defaults to true when --deployment is used.  IP "o" 4
gem.push_key (BUNDLE_GEM__PUSH_KEY): Sets the --key parameter for
gem push when using the rake release command with a private  gem-
stash server.  IP "o" 4 gemfile (BUNDLE_GEMFILE): The name of the
file that bundler should use as the  Gemfile.  This  location  of
this file also sets the root of the project, which is used to re-
solve relative paths in the Gemfile, among other things.  By  de-
fault,  bundler will search up from the current working directory
until it finds  a  Gemfile.   IP  "o"  4  global_gem_cache  (BUN-
DLE_GLOBAL_GEM_CACHE):  Whether  Bundler  should  cache  all gems
globally, rather than locally to the  installing  Ruby  installa-
tion.   IP  "o"  4  global_path_appends_ruby_scope  (BUNDLE_GLOB-
AL_PATH_APPENDS_RUBY_SCOPE): Whether Bundler  should  append  the
Ruby scope (e.g. engine and ABI version) to a globally-configured
path.  IP "o" 4  ignore_messages  (BUNDLE_IGNORE_MESSAGES):  When
set,  no post install messages will be printed. To silence a sin-
gle gem, use dot notation like ignore_messages.httparty true.  IP
"o"  4  init_gems_rb (BUNDLE_INIT_GEMS_RB) Generate a gems.rb in-
stead of a Gemfile when running bundle init.  IP "o" 4 jobs (BUN-
DLE_JOBS):  The  number  of gems Bundler can install in parallel.
Defaults to 1.  IP "o" 4 list_command  (BUNDLE_LIST_COMMAND)  En-
able  new  list command feature IP "o" 4 major_deprecations (BUN-
DLE_MAJOR_DEPRECATIONS): Whether Bundler should print deprecation
warnings for behavior that will be changed in the next major ver-
sion.  IP "o" 4 no_install  (BUNDLE_NO_INSTALL):  Whether  bundle
package  should  skip  installing  gems.  IP "o" 4 no_prune (BUN-
DLE_NO_PRUNE): Whether Bundler should  leave  outdated  gems  un-
pruned  when  caching.   IP  "o"  4 only_update_to_newer_versions
(BUNDLE_ONLY_UPDATE_TO_NEWER_VERSIONS): During bundle update, on-
ly resolve to newer versions of the gems in the lockfile.  IP "o"
4 path (BUNDLE_PATH): The location on disk where all gems in your
bundle  will be located regardless of $GEM_HOME or $GEM_PATH val-
ues. Bundle gems not found in this location will be installed  by
bundle  install.  Defaults to Gem.dir. When --deployment is used,
defaults  to  vendor/bundle.   IP   "o"   4   path.system   (BUN-
DLE_PATH__SYSTEM): Whether Bundler will install gems into the de-
fault system  path  (Gem.dir).   IP  "o"  4  path_relative_to_cwd
(PATH_RELATIVE_TO_CWD)  Makes  --path relative to the CWD instead
of the  Gemfile.   IP  "o"  4  plugins  (BUNDLE_PLUGINS):  Enable
Bundler's  experimental  plugin  system.  IP "o" 4 prefer_gems_rb
(BUNDLE_PREFER_GEMS_RB) Prefer gems.rb to Gemfile when Bundler is
searching  for  a  Gemfile.   IP  "o" 4 print_only_version_number
(BUNDLE_PRINT_ONLY_VERSION_NUMBER) Print only version number from
bundler --version.  IP "o" 4 redirect (BUNDLE_REDIRECT): The num-
ber of redirects allowed for network requests. Defaults to 5.  IP
"o"  4  retry (BUNDLE_RETRY): The number of times to retry failed
network requests. Defaults  to  3.   IP  "o"  4  setup_makes_ker-
nel_gem_public    (BUNDLE_SETUP_MAKES_KERNEL_GEM_PUBLIC):    Have
Bundler.setup make the  Kernel#gem  method  public,  even  though
RubyGems  declares  it as private.  IP "o" 4 shebang (BUNDLE_SHE-
BANG): The program name that should be invoked for generated bin-
stubs.  Defaults  to  the  ruby install name used to generate the
binstub.    IP    "o"    4    silence_root_warning    (BUNDLE_SI-
LENCE_ROOT_WARNING):  Silence the warning Bundler prints when in-
stalling gems as root.  IP "o" 4  skip_default_git_sources  (BUN-
DLE_SKIP_DEFAULT_GIT_SOURCES): Whether Bundler should skip adding
default git source shortcuts to the Gemfile DSL.  IP "o"  4  spe-
cific_platform  (BUNDLE_SPECIFIC_PLATFORM):  Allow bundler to re-
solve for the specific running platform and store it in the lock-
file,  instead of only using a generic platform. A specific plat-
form is the exact platform triple reported  by  Gem::Platform.lo-
cal, such as x86_64-darwin-16 or universal-java-1.8. On the other
hand, generic platforms are those such as ruby, mswin,  or  java.
In  this  example, x86_64-darwin-16 would map to ruby and univer-
sal-java-1.8 to java.  IP "o" 4 ssl_ca_cert (BUNDLE_SSL_CA_CERT):
Path  to  a  designated  CA certificate file or folder containing
multiple certificates for trusted CAs in PEM format.   IP  "o"  4
ssl_client_cert  (BUNDLE_SSL_CLIENT_CERT):  Path  to a designated
file containing a X.509 client certificate and key in PEM format.
IP  "o" 4 ssl_verify_mode (BUNDLE_SSL_VERIFY_MODE): The SSL veri-
fication mode Bundler uses when making HTTPS  requests.  Defaults
to  verify  peer.  IP "o" 4 suppress_install_using_messages (BUN-
DLE_SUPPRESS_INSTALL_USING_MESSAGES): Avoid  printing  Using  ...
messages  during  installation  when the version of a gem has not
changed.  IP "o" 4 system_bindir (BUNDLE_SYSTEM_BINDIR): The  lo-
cation  where RubyGems installs binstubs. Defaults to Gem.bindir.
IP "o" 4 timeout (BUNDLE_TIMEOUT):  The  seconds  allowed  before
timing  out  for  network requests. Defaults to 10.  IP "o" 4 un-
lock_source_unlocks_spec     (BUNDLE_UNLOCK_SOURCE_UNLOCKS_SPEC):
Whether  running  bundle  update --source NAME unlocks a gem with
the  given  name.  Defaults  to  true.   IP  "o"   4   update_re-
quires_all_flag (BUNDLE_UPDATE_REQUIRES_ALL_FLAG) Require passing
--all to bundle update when everything  should  be  updated,  and
disallow  passing  no  options  to  bundle  update.  IP "o" 4 us-
er_agent (BUNDLE_USER_AGENT):  The  custom  user  agent  fragment
Bundler includes in API requests.  IP "o" 4 with (BUNDLE_WITH): A
:-separated list of groups whose gems bundler should install.  IP
"o"  4  without  (BUNDLE_WITHOUT):  A  :-separated list of groups
whose gems bundler should not install.  IP "" 0 P In general, you
should set these settings per-application by using the applicable
flag to the bundle  install(1)  bundle-install.1.html  or  bundle
package(1)  bundle-package.1.html  command.   P  You can set them
globally either  via  environment  variables  or  bundle  config,
whichever is preferable for your setup. If you use both, environ-
ment variables will take preference  over  global  settings.   SH
"LOCAL  GIT  REPOS" Bundler also allows you to work against a git
repository locally instead of using the remote version. This  can
be achieved by setting up a local override: IP "" 4 nf

bundle  config local.GEM_NAME /path/to/local/git/repository fi IP
"" 0 P For example, in order to use a local  Rack  repository,  a
developer could call: IP "" 4 nf

bundle config local.rack ~/Work/git/rack fi IP "" 0 P Now instead
of checking out the remote git  repository,  the  local  override
will  be used. Similar to a path source, every time the local git
repository change, changes will be  automatically  picked  up  by
Bundler.  This  means  a commit in the local git repo will update
the revision in the Gemfile.lock to the local git repo  revision.
This  requires the same attention as git submodules. Before push-
ing to the remote, you need to  ensure  the  local  override  was
pushed,  otherwise  you may point to a commit that only exists in
your local machine. You'll also need to CGI escape your usernames
and  passwords  as  well.  P Bundler does many checks to ensure a
developer won't work with invalid  references.  Particularly,  we
force  a developer to specify a branch in the Gemfile in order to
use this feature. If the branch specified in the Gemfile and  the
current  branch in the local git repository do not match, Bundler
will abort. This ensures  that  a  developer  is  always  working
against  the correct branches, and prevents accidental locking to
a different branch.  P Finally, Bundler  also  ensures  that  the
current  revision  in  the  Gemfile.lock  exists in the local git
repository. By doing this, Bundler forces you to fetch the latest
changes in the remotes.  SH "MIRRORS OF GEM SOURCES" Bundler sup-
ports overriding gem sources with mirrors.  This  allows  you  to
configure  rubygems.org  as  the gem source in your Gemfile while
still using your mirror to fetch gems.  IP "" 4 nf

bundle config mirror.SOURCE_URL MIRROR_URL fi IP "" 0 P For exam-
ple,  to  use  a  mirror  of rubygems.org hosted at rubygems-mir-
ror.org: IP "" 4 nf

bundle  config  mirror.http://rubygems.org   http://rubygems-mir-
ror.org fi IP "" 0 P Each mirror also provides a fallback timeout
setting. If the mirror does not respond within the fallback time-
out,  Bundler  will try to use the original server instead of the
mirror.  IP "" 4 nf

bundle config mirror.SOURCE_URL.fallback_timeout TIMEOUT fi IP ""
0 P For example, to fall back to rubygems.org after 3 seconds: IP
"" 4 nf

bundle config mirror.https://rubygems.org.fallback_timeout  3  fi
IP  ""  0  P The default fallback timeout is 0.1 seconds, but the
setting can currently only accept whole seconds (for example,  1,
15,  or 30).  SH "CREDENTIALS FOR GEM SOURCES" Bundler allows you
to configure credentials for any gem source, which allows you  to
avoid putting secrets into your Gemfile.  IP "" 4 nf

bundle  config SOURCE_HOSTNAME USERNAME:PASSWORD fi IP "" 0 P For
example, to save the credentials of user claudette  for  the  gem
source at gems.longerous.com, you would run: IP "" 4 nf

bundle  config gems.longerous.com claudette:s00pers3krit fi IP ""
0 P Or you can set the credentials  as  an  environment  variable
like this: IP "" 4 nf

export BUNDLE_GEMS__LONGEROUS__COM="claudette:s00pers3krit" fi IP
"" 0 P For gems with a git source with HTTP(S) URL you can speci-
fy credentials like so: IP "" 4 nf

bundle    config   https://github.com/bundler/bundler.git   user-
name:password fi IP "" 0 P Or you can set the credentials  as  an
environment variable like so: IP "" 4 nf

export  BUNDLE_GITHUB__COM=username:password fi IP "" 0 P This is
especially useful for  private  repositories  on  hosts  such  as
Github, where you can use personal OAuth tokens: IP "" 4 nf

export BUNDLE_GITHUB__COM=abcd0123generatedtoken:x-oauth-basic fi
IP "" 0 SH "CONFIGURE BUNDLER DIRECTORIES" Bundler's  home,  con-
fig,  cache  and  plugin  directories  are  able to be configured
through environment variables. The default location for Bundler's
home  directory  is ~/.bundle, which all directories inherit from
by default. The  following  outlines  the  available  environment
variables and their default values IP "" 4 nf

BUNDLE_USER_HOME  : $HOME/.bundle BUNDLE_USER_CACHE : $BUNDLE_US-
ER_HOME/cache BUNDLE_USER_CONFIG : $BUNDLE_USER_HOME/config  BUN-
DLE_USER_PLUGIN : $BUNDLE_USER_HOME/plugin fi IP "" 0



See for descriptions of the following attributes:







+---------------+------------------+
|ATTRIBUTE TYPE | ATTRIBUTE VALUE  |
+---------------+------------------+
|Availability   | runtime/ruby-26  |
+---------------+------------------+
|Stability      | Uncommitted      |
+---------------+------------------+

This    software    was    built   from   source   available   at
https://github.com/oracle/solaris-userland.  The original  commu-
nity    source    was    downloaded    from    http://cache.ruby-
lang.org/pub/ruby/2.6/ruby-2.6.0.tar.gz

Further information about this software can be found on the  open
source community website at http://www.ruby-lang.org/.