What does it mean BUNDLE_DISABLE_SHARED_GEMS: '1'?
Asked Answered
C

4

27

I found BUNDLE_DISABLE_SHARED_GEMS: '1', in .bundle/config. What does it mean?

Continually answered 12/11, 2011 at 12:12 Comment(0)
D
21

Bundler takes some settings from the ~/.bundle/config file -- not from the shell env.

When set to true (default), the install of all gems will be to BUNDLE_PATH, regardless of whether those gems are installed in your system.

Bundler will not install gems already in system gems by default, so this is especially useful if you're trying to package up an application with all dependencies unpacked.

Duumvir answered 12/11, 2011 at 12:27 Comment(1)
i assume 1==true in this case?Dermott
M
5

That means that a "bundle install" will always install the gems into a local directory (defaults to .bundle), and use those, instead of system-wide installed gems.

Morehead answered 12/11, 2011 at 12:24 Comment(1)
I found that my .bundle/config file has BUNDLE_DISABLE_SHARED_GEMS set to true, but when I ran bundle, no gems were installed into local .bundle folder. BUNDLE_PATH env var is not set.Suburban
G
2

I will say this much, I commented out BUNDLE_DISABLE_SHARED_GEMS: '1' on my system, and this prevented passenger standalone from serving a page, yielding an error starting with: "It looks like Bundler could not find a gem."

I am running all my gems except passenger in a locally bundled gemset.

Gloss answered 21/10, 2015 at 12:26 Comment(0)
H
0

From the bundler documentation:

Stop Bundler from accessing gems installed to RubyGems' normal location.

Honegger answered 10/5, 2023 at 8:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.