Closed tiancheng92 closed 2 years ago
Issue looks to be caused by this commit.
https://github.com/Homebrew/brew/commit/fb8a4e565836e33f2195ff49eaf10535d8bb78a0
My fix so far has been this:
cp -R /usr/local/lib/ruby/gems/2.6.0/gems/addressable-2.8.0/data /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/addressable-2.8.0
I don't have dir /usr/local/lib/ruby/gems/2.6.0 I have dir /usr/local/lib/ruby/gems/3.10 how to fix this error,plz?
Likely just replace the 2.6.0
with 3.10
.
Likely just replace the
2.6.0
with3.10
.
But there is no folder with path like 2.6
Otherwise just get the unicode.data
file from here:
https://github.com/sporkmonger/addressable/tree/main/data
It is only this file that needs to be in that directory.
yes! it's work,thanks
Otherwise just get the
unicode.data
file from here:https://github.com/sporkmonger/addressable/tree/main/data
It is only this file that needs to be in that directory.
@tiancheng92 did this work for you as well? Can we close this then?
I think this is an issue that will impact others. This may require an update to this addon.
i had the same issue and resolved it by
mkdir /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/addressable-2.8.0/data/
wget https://raw.githubusercontent.com/sporkmonger/addressable/main/data/unicode.data -O /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/addressable-2.8.0/data/unicode.data
I think this is an issue that will impact others. This may require an update to this addon.
@mikelorant What kind of update you have in mind? We're using "standard" brew
commands to update the casks, therefore to me it seems is an issue with homebrew itself?
It doesn't happen to me, so it's probably related to some specific conditions? It's hard to "fix" if we can't reproduce :-(
We're using "standard" brew commands to update the casks
Is there a way to find what brew command triggers this error? I have the same issue with brew cu
, but regular brew
cli works okay.
@z0rc I don't think there is an easy way. Does it happen immediately or you already get some output before it errors out?
@ondrejfuhrer Almost immediately after exec, no additional output.
% brew cu
Error: No such file or directory @ rb_sysopen - /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/addressable-2.8.0/data/unicode.data
Tested also brew cu --verbose --no-brew-update
, but additional options didn't have an effect, error remains as is. brew cu --help
works okay though.
I am also receiving this error. The same as @z0rc, there's also no additional output. cu --help
does also work for me.
yes! it's work,thanks
yes! it's work,thanks
@z0rc & @kovalchik can you try running brew vendor-install ruby
if that fixes it maybe?
Since there is no input then it means something is off with the initialisation of this extension, but I can't find anything even closely related to the issue described.
@ondrejfuhrer brew vendor-install ruby
completed successfully, but didn't fix the issue. đ
Didn't meant to close it immediately. @kovalchik can you try brew update
and then brew cu
if it works now? I managed to reproduce the issue and might have found the culprit. Not sure though if it didn't break anything else đ đ¤
@ondrejfuhrer That worked! After running brew update
, brew cu
ran and completed successfully. đ
I also confirm that this fixed the issue. Thanks!
From a quick glance, this issue is likely due to needing to run #install_bundler_gems
at some point. We usually call Homebrew.install_bundler_gems!
in commands that use parts of brew that involve external gems (like addressable
) but I forgot to handle that in the aforementioned PR. I imagine it's affecting your code because cask/audit
requires livecheck/livecheck
which now requires addressable
.
Anyone who's seeing this error has already run a dev-cmd before (i.e., my commit isn't in a brew
release yet), so they should be able to safely resolve the error by running brew install-bundler-gems
.
I'm working on a follow-up PR on our end but, unfortunately, I have to create a separate PR beforehand to modify the behavior of #install_bundler_gems
(to be able to safely call it in livecheck). Once that's done and I've added Homebrew.install_bundler_gems!
in related parts of brew
(livecheck
, bump
, cask/audit
), it may resolve this issue for you.
If you want to resolve this quickly or err on the safe side, you can add a Homebrew.install_bundler_gems!
call in your code (somewhere early on, where you're setting things up). If you search the brew
codebase for install_bundler_gems!
, you'll find some example usage.
Thank you for the context @samford ! I actually removed direct require of cask
(which was causing the issue) which probably happens anyways somewhere as the code works without any issues (or at least I haven't spotted any).
That being said, it's great to have the context on this to understand what happened đ
I'll consider this issue being resolved then đ thank you all for your help investigating this.
After investigating further, we just needed to vendor more of addressable
. We were already vendoring the lib
directory by default but we also need the data
directory, where unicode.data
is found. I didn't see the error when I was testing because my addressable
directory had all the files from when it was installed. We temporarily reverted the aforementioned commit but a fix will be included when it's reinstated, so this shouldn't require changes on your end (edit: now reinstated with gem-related fixes).
At this point, users can resolve the error by running brew update
.