Comments (14)
Setting it unconditionally to HOMEBREW_CACHE/bundler
could make sense.
after clearing Homebrew gems
How are you clearing the gems?
from brew.
Yeah that's the supported way. Will check why Bundler doesn't cleanup plugins.
from brew.
Why do you want this variable to be honoured?
That Homebrew uses Bundler should be seen as an implementation detail. This seems like a potentially small performance improvement for developer commands in exchange for a higher change of errors occurring with cache/Bundler issues.
from brew.
I am not sure we are on the same page. Hopefully the following will add more clarity.
On macOS I have setup my shell environment to follow the XDG directory spec as much as possible. To have my preferences supported by Bundler I added the BUNDLER_USER_*
variables to my profile per Bundler's instructions. Using Bundler (installed via Homebrew's Ruby formula) directly I found that my defined paths were honored and the default ~/.bundler
folder was not created. However, outside my use of Bundler I found that the ~/.bundler
folder was being created and used by another tool. After a little testing, I found that Homebrew's use of Bundler was the source and only the ~/.bundler/cache
folder was being created.
So for me, supporting BUNDLER_USER_CACHE
would reduce some confusion and potentially support a user's existing preferences.
(I did try one quick attempt at implementing a solution but I was unsuccessful.)
from brew.
After a little testing, I found that Homebrew's use of Bundler was the source and only the
~/.bundler/cache
folder was being created.
Was anything put in it/used from it? Ideally we'd avoid creating/using these sorts of directories in Homebrew at all. I agree with avoiding writing things to $HOME
is ideal if possible.
from brew.
Yes. Standard looking compact_index
folder and contents.
Attached is directory listing after running the following:
brew install-bundler-gems --groups=
rm -frd ~/.bundle
brew install-bundler-gems --add-groups=bottle
ls -R ~/.bundle > ~/Downloads/ruby-cache-ls.txt
from brew.
As a side note, after clearing Homebrew gems and then reinstalling the following error is consistently flagged.
Error loading RubyGems plugin "/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/plugins/yard_plugin.rb": cannot load such file -- /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/yard-0.9.36/lib/rubygems_plugin.rb (LoadError)
from brew.
How are you clearing the gems?
Via brew install-bundler-gems --groups=
I found the solution in a comment on GitHub. It wasn't clear to me how to do it otherwise.
from brew.
Setting it unconditionally to
HOMEBREW_CACHE/bundler
could make sense.
Agreed. Should just be an environment variable to do so.
from brew.
On my end #17304 doesn't resolve the issue. ~/bundle
reappears when running brew install-bundler-gems --add-groups=bottle
. No folder is created in ~/Library/Caches/Homebrew
, if that is the new location.
from brew.
What's the output of brew config
and brew doctor
?
from brew.
brew config
HOMEBREW_VERSION: 4.3.0-22-g56db99e
ORIGIN: https://github.com/Homebrew/brew
HEAD: 56db99e
Last commit: 3 hours ago
Core tap JSON: 15 May 16:39 UTC
Core cask tap JSON: 15 May 16:39 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_CLEANUP_MAX_AGE_DAYS: 60
HOMEBREW_DEVELOPER: set
HOMEBREW_EDITOR: /opt/homebrew/bin/mvim
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 8
HOMEBREW_NO_EMOJI: set
HOMEBREW_NO_ENV_HINTS: set
HOMEBREW_NO_UPDATE_REPORT_NEW: set
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.1.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: octa-core 64-bit arm_ibiza
Clang: 15.0.0 build 1500
Git: 2.45.1 => /opt/homebrew/bin/git
Curl: 8.6.0 => /usr/bin/curl
macOS: 14.5-arm64
CLT: 15.3.0.0.1.1708646388
Xcode: N/A
Rosetta 2: false
brew doctor
Your system is ready to brew.
from brew.
~/bundle
reappears when runningbrew install-bundler-gems --add-groups=bottle
.
Do you have a ~/.bundle/config
?
from brew.
Do you have a
~/.bundle/config
?
No. The following is my .zprofile
:
export BUNDLE_USER_CONFIG=$XDG_CONFIG_HOME/bundle/config
export BUNDLE_USER_PLUGIN=$XDG_DATA_HOME/bundle
export BUNDLE_USER_CACHE=$XDG_CACHE_HOME/bundle
Output from bundle config list
:
Settings are listed in order of priority. The top value will be used.
user_cache
Set via BUNDLE_USER_CACHE: "/Users/xxx/.cache/bundle"
user_config
Set via BUNDLE_USER_CONFIG: "/Users/xxx/.config/bundle/config"
user_plugin
Set via BUNDLE_USER_PLUGIN: "/Users/xxx/.local/share/bundle"
I don't have a config file so the config folder doesn't exist and is not created.
from brew.
Related Issues (20)
- [Intentional or bug?] v4.3.19 `brew list` now outputs single column lists HOT 3
- MariaDB fails to start on Debian 12 HOT 3
- Document cryptographic signature usage for authenticity HOT 2
- Forbid using some formulas provided by macOS HOT 7
- Docker images have expired key for github cli packages HOT 9
- update-python-resources munges`--extra-packages` if it's a URL HOT 2
- Tracking Issue: Concurrent Downloads HOT 6
- brew update doesn't show outdated formulae on second run HOT 3
- `update-python-resources` should support non-PyPI indexes HOT 11
- Throttle does not work for llama.cpp HOT 2
- Support specifying replacement formulae in `deprecate!` or `disable!` calls HOT 1
- Brew appears to be broken HOT 3
- shellenv.sh: Failure when user cannot write "${HOMEBREW_PATHS_FILE}" HOT 1
- Archive and deprecate HOT 1
- Consider setting `XDG_DATA_DIRS` in `shellenv` on Linux HOT 1
- Multiple Formula giving `Error: Couldn't find manifest matching bottle checksum.` HOT 4
- pkg missing for release 4.3.21 assets HOT 4
- sha256 checksum is not enforced HOT 2
- Setup `brew determine-test-runners` for macOS 15 x86_64 HOT 11
- Avoid outputting Rosetta 2 caveats on Intel machines HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brew.