Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

BUNDLER_HOME env var #5372

Closed
svoop opened this issue Jan 26, 2017 · 2 comments
Closed

BUNDLER_HOME env var #5372

svoop opened this issue Jan 26, 2017 · 2 comments

Comments

@svoop
Copy link
Contributor

svoop commented Jan 26, 2017

Since 1.14.x, Bundler tries to create a fallback home directory underneath Dir.tmpdir in case the user home read from Bundler.rubygems.user_home (doing File.expand_path "~") is not writable. This is causing problems in certain scenarios such as #5371 and #5363.

How about adding an environment variable $BUNDLE_HOME:

  • When set to a path, the path is used instead of Bundler.rubygems.user_home. Good for deployments to readwrite FS where the regular user home is not writable due to security restrictions.
  • When set to "", no fallback home directory is created and Bundler does not attempt to read the global config. Good for deployments to writeonly FS (e.g. Docker).
@segiddins
Copy link
Member

As I posted in #5371, bundler should swallow the error when attempting to read the global config anyways

@colby-swandale
Copy link
Member

This has been added in #6024 which is part of 1.17.0.pre.2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants