Homebrew / legacy-homebrew

💀 The former home of Homebrew/homebrew (deprecated)
https://brew.sh
26.96k stars 11.35k forks source link

Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX #42553

Closed williammortl closed 9 years ago

williammortl commented 9 years ago

I am not sure why I got this this morning. I ran update again and everything seems fine. I am only reporting this as a courtesy as the message says to report:

Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX Please report this bug: https://git.io/brew-troubleshooting /usr/local/Library/Homebrew/formulary.rb:214:in loader_for' /usr/local/Library/Homebrew/formulary.rb:174:infactory' /usr/local/Library/Homebrew/cmd/update.rb:205:in block in report' /usr/local/Library/Homebrew/cmd/update.rb:190:ineach_line' /usr/local/Library/Homebrew/cmd/update.rb:190:in report' /usr/local/Library/Homebrew/cmd/update.rb:24:inupdate' /usr/local/Library/brew.rb:127:in `

'

mistydemeo commented 9 years ago

We know that this issue is temporary and goes away subsequently - we only need reports if it keeps happening for you. Thanks!

cauchycai commented 9 years ago

➜ ~ brew update Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX Please report this bug: https://git.io/brew-troubleshooting /usr/local/Library/Homebrew/formulary.rb:214:in loader_for' /usr/local/Library/Homebrew/formulary.rb:174:infactory' /usr/local/Library/Homebrew/cmd/update.rb:205:in block in report' /usr/local/Library/Homebrew/cmd/update.rb:190:ineach_line' /usr/local/Library/Homebrew/cmd/update.rb:190:in report' /usr/local/Library/Homebrew/cmd/update.rb:24:inupdate' /usr/local/Library/brew.rb:127:in `

'

moritzp commented 9 years ago

Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX Please report this bug: https://git.io/brew-troubleshooting /usr/local/Library/Homebrew/formulary.rb:214:in loader_for' /usr/local/Library/Homebrew/formulary.rb:174:infactory' /usr/local/Library/Homebrew/cmd/update.rb:204:in block in report' /usr/local/Library/Homebrew/cmd/update.rb:190:ineach_line' /usr/local/Library/Homebrew/cmd/update.rb:190:in report' /usr/local/Library/Homebrew/cmd/update.rb:24:inupdate' /usr/local/Library/brew.rb:125:in `

'

haolly commented 9 years ago

same issue: Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX Please report this bug: https://git.io/brew-troubleshooting /usr/local/Library/Homebrew/formulary.rb:214:in loader_for' /usr/local/Library/Homebrew/formulary.rb:174:infactory' /usr/local/Library/Homebrew/cmd/update.rb:173:in block in report' /usr/local/Library/Homebrew/cmd/update.rb:159:ineach_line' /usr/local/Library/Homebrew/cmd/update.rb:159:in report' /usr/local/Library/Homebrew/cmd/update.rb:24:inupdate' /usr/local/Library/brew.rb:124:in `

'

DomT4 commented 9 years ago

We only need reports on this if the issue happens again after a second brew update. The second brew update should fix the error. Thanks!

MikeMcQuaid commented 9 years ago

@DomT4 @mistydemeo I'd just leave this issue open and ignore more comments for now.

lferro9000 commented 9 years ago

I got this error, performed brew doctor as recommended, added the echo 'export path' that doctor recommended and the error is now gone.

alecfwilson commented 9 years ago
$ brew update
Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX
Please report this bug:
    https://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/formulary.rb:227:in `loader_for'
/usr/local/Library/Homebrew/formulary.rb:176:in `factory'
/usr/local/Library/Homebrew/cmd/update.rb:204:in `block in report'
/usr/local/Library/Homebrew/cmd/update.rb:190:in `each_line'
/usr/local/Library/Homebrew/cmd/update.rb:190:in `report'
/usr/local/Library/Homebrew/cmd/update.rb:24:in `update'
/usr/local/Library/brew.rb:125:in `<main>'

Came here, saw the message about new reports. Visited the linked issue, saw that running brew update again could solve it. Ran it again, new output is:

$ brew update
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed
Error: Failure while executing: git pull --quiet origin refs/heads/master:refs/remotes/origin/master
FAIL

Tried running brew upgrade, as well as brew doctor, but my output hasn't changed.

UPDATE: reran brew update as root, and everything reverted to normal

DomT4 commented 9 years ago

UPDATE: reran brew update as root, and everything reverted to normal

Rather than defaulting to root forever more, you should do sudo chown -R $(whoami) /usr/local which should resolve your issue.

alecfwilson commented 9 years ago

Thanks, hadn't even realized I'd have to run as root in the future

kyungkoo commented 9 years ago

I also samething.

Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX Please report this bug: https://git.io/brew-troubleshooting /usr/local/Library/Homebrew/formulary.rb:227:in loader_for' /usr/local/Library/Homebrew/formulary.rb:176:infactory' /usr/local/Library/Homebrew/cmd/update.rb:205:in block in report' /usr/local/Library/Homebrew/cmd/update.rb:190:ineach_line' /usr/local/Library/Homebrew/cmd/update.rb:190:in report' /usr/local/Library/Homebrew/cmd/update.rb:24:inupdate' /usr/local/Library/brew.rb:127:in `

'

guidomb commented 9 years ago

My builds are failing in travis for the same reason. Does anyone know what the problem is?

dunn commented 9 years ago

In Travis, just make sure you run brew update before anything else to flush out the error.

hzalaz commented 9 years ago

Changed brew update to brew update; brew update in .travis.yml and got my builds working

MarvelousDE commented 9 years ago

same here. have script which does -> update --all upgrade doctor... the error comes up in update --all. it seems to go through anyway. when i repeated update --all it returned up-to-date

hanxue commented 9 years ago

Got this problem today - 1925 GMT+8. Last updated Homebrew 1 week ago (sorry, don't have a record of actual date last run).

$ brew update
Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX
Please report this bug:
    https://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/formulary.rb:227:in `loader_for'
/usr/local/Library/Homebrew/formulary.rb:176:in `factory'
/usr/local/Library/Homebrew/cmd/update.rb:205:in `block in report'
/usr/local/Library/Homebrew/cmd/update.rb:190:in `each_line'
/usr/local/Library/Homebrew/cmd/update.rb:190:in `report'
/usr/local/Library/Homebrew/cmd/update.rb:24:in `update'
/usr/local/Library/brew.rb:127:in `<main>'

As with the others, running brew update the 2nd time solved the problem.

$ brew update
Updated Homebrew from b3681622 to b3681622

Do let me know if any further information will be helpful in solving this problem.

AndrewDryga commented 9 years ago

+1

jorge-d commented 9 years ago

Same here:

screen shot 2015-08-11 at 16 42 49
AndrewDryga commented 9 years ago

It seems that you need to run brew update on your VMs. This is homebrew issue that was fixed in laters releases.

On Tue, Aug 11, 2015 at 5:44 PM, Dimitri Jorge notifications@github.com wrote:

Same here: [image: screen shot 2015-08-11 at 16 42 49] https://cloud.githubusercontent.com/assets/1178099/9200435/15ab76c2-4048-11e5-8466-7d464ee5747f.png

— Reply to this email directly or view it on GitHub https://github.com/Homebrew/homebrew/issues/42553#issuecomment-129912370 .

Sincerely, Andrew Dryga. Phones:

KIVagant commented 9 years ago

Saw this error too.

PaulNokel commented 9 years ago

Same error. Running "brew up" twice fixed it:

pno:~/ $ brew up                                                                                                                                                       [9:56:52]
Checking out files: 100% (2325/2325), done.
Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX
Please report this bug:
    https://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/formulary.rb:227:in `loader_for'
/usr/local/Library/Homebrew/formulary.rb:176:in `factory'
/usr/local/Library/Homebrew/cmd/update.rb:204:in `block in report'
/usr/local/Library/Homebrew/cmd/update.rb:190:in `each_line'
/usr/local/Library/Homebrew/cmd/update.rb:190:in `report'
/usr/local/Library/Homebrew/cmd/update.rb:24:in `update'
/usr/local/Library/brew.rb:124:in `<main>'
pno:~/ $ brew up                                                                                                                                                      [10:11:07]
Updated Homebrew from 74974772 to 74974772.
==> New Formulae
.......
pno:~/ $
nj commented 9 years ago

Same experience as others - first try giving exception, next returning Already up-to-date.

mgrachev commented 9 years ago

+1

danishabdullah commented 9 years ago

+1

Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX
Please report this bug:
    https://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/formulary.rb:227:in `loader_for'
/usr/local/Library/Homebrew/formulary.rb:176:in `factory'
/usr/local/Library/Homebrew/cmd/update.rb:173:in `block in report'
/usr/local/Library/Homebrew/cmd/update.rb:159:in `each_line'
/usr/local/Library/Homebrew/cmd/update.rb:159:in `report'
/usr/local/Library/Homebrew/cmd/update.rb:24:in `update'
/usr/local/Library/brew.rb:140:in `<main>'
DevByStarlight commented 9 years ago

$ brew --version

0.9.5

git repo fetch from master head at commit: f86d0f1c7a5c61c5be47b2d2a2ff30a1bce0e8a5

brew outdated Checking out files: 100% (2221/2221), done. Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX Please report this bug: https://git.io/brew-troubleshooting /usr/local/Library/Homebrew/formulary.rb:227:in loader_for' /usr/local/Library/Homebrew/formulary.rb:176:infactory' /usr/local/Library/Homebrew/cmd/update.rb:204:in block in report' /usr/local/Library/Homebrew/cmd/update.rb:190:ineach_line' /usr/local/Library/Homebrew/cmd/update.rb:190:in report' /usr/local/Library/Homebrew/cmd/update.rb:24:inupdate' /usr/local/Library/brew.rb:125:in `

'

martineno commented 9 years ago

An additional data point, I ran into this bug when running

brew update

Running a second brew update appears to have completed the update without problems. Abbreviated transcript of the error follows:

Updating 13495cd..6ecb586
Fast-forward
 .gitignore                                                |    7 +-

 [snip about 2000 lines of file updates]

 create mode 100644 Library/Homebrew/formula_renames.rb
 rename Library/Homebrew/{keg_fix_install_names.rb => keg_relocate.rb} (77%)
 create mode 100644 Library/Homebrew/migrator.rb
 delete mode 100644 Library/Homebrew/test/.gitignore
 create mode 100644 Library/Homebrew/test/.simplecov
 create mode 100644 Library/Homebrew/test/fixtures/receipt_old.json
 create mode 100644 Library/Homebrew/test/test_caveats.rb
 create mode 100644 Library/Homebrew/test/test_formula_support.rb
 create mode 100644 Library/Homebrew/test/test_integration_cmds.rb
 create mode 100644 Library/Homebrew/test/test_migrator.rb
 create mode 100644 share/doc/homebrew/How-to-Create-and-Maintain-a-Tap.md
 create mode 100644 share/doc/homebrew/Rename-A-Formula.md
Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX
Please report this bug:
    https://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/formulary.rb:227:in `loader_for'
/usr/local/Library/Homebrew/formulary.rb:176:in `factory'
/usr/local/Library/Homebrew/cmd/update.rb:203:in `block in report'
/usr/local/Library/Homebrew/cmd/update.rb:189:in `each_line'
/usr/local/Library/Homebrew/cmd/update.rb:189:in `report'
/usr/local/Library/Homebrew/cmd/update.rb:24:in `update'
/usr/local/Library/brew.rb:124:in `<main>'
machine:~ martineno$ brew --version
0.9.5
machine:~ martineno$ brew update
Updated Homebrew from 6ecb586c to 6ecb586c.
==> Updated Formulae
homebrew/binary/adobe-air-sdk            homebrew/binary/perforce
homebrew/binary/adobe-air-sdk-flex       homebrew/binary/perforce-proxy
homebrew/binary/ddptools             homebrew/binary/perforce-server
homebrew/binary/mpress               homebrew/binary/subgit
==> Deleted Formulae
homebrew/binary/consul        homebrew/binary/exercism
tommymcdonald commented 9 years ago

brew unlink openssl && brew update fixed this for me.

neverfox commented 9 years ago

Same problem. Error on first try, success on second.

crokobit commented 9 years ago

same here~

dimitrisli commented 9 years ago

I got the same error on brew update, then after issuing brew doctor and repeat it didn't came up.

RickCogley commented 9 years ago

I got the same error on brew update but running it again seems to have fixed it.

me@mine:~|⇒  brew update
Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX
Please report this bug:
    https://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/formulary.rb:226:in `loader_for'
/usr/local/Library/Homebrew/formulary.rb:176:in `factory'
/usr/local/Library/Homebrew/cmd/update.rb:204:in `block in report'
/usr/local/Library/Homebrew/cmd/update.rb:190:in `each_line'
/usr/local/Library/Homebrew/cmd/update.rb:190:in `report'
/usr/local/Library/Homebrew/cmd/update.rb:24:in `update'
/usr/local/Library/brew.rb:125:in `<main>'
rcogley@jrcmbp2015:~|⇒  brew update
Updated Homebrew from 37959a7e to 37959a7e.
==> Updated Formulae
homebrew/dupes/nano    homebrew/dupes/ncurses     homebrew/dupes/openssh
me@mine:~|⇒
mrageh commented 9 years ago

I've also experienced the same error after running brew update for the first time, but running it again seems to have fixed it.

 brew update
Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX
Please report this bug:
    https://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/formulary.rb:226:in `loader_for'
/usr/local/Library/Homebrew/formulary.rb:176:in `factory'
/usr/local/Library/Homebrew/cmd/update.rb:204:in `block in report'
/usr/local/Library/Homebrew/cmd/update.rb:190:in `each_line'
/usr/local/Library/Homebrew/cmd/update.rb:190:in `report'
/usr/local/Library/Homebrew/cmd/update.rb:24:in `update'
/usr/local/Library/brew.rb:125:in `<main>'
fffabs commented 9 years ago

Same error for me, I ran brew doctor and it told me to upgrade my Xcode to 6.4, re-ran brew upgrade and worked straightaway.

mgold commented 9 years ago

Ditto on running brew update again to resolve.

clarisli commented 9 years ago

Same here, re-running brew update to resolve.

walterdolce commented 9 years ago

Hi there, got an other one here.

Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX
Please report this bug:
    https://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/formulary.rb:226:in `loader_for'
/usr/local/Library/Homebrew/formulary.rb:176:in `factory'
/usr/local/Library/Homebrew/cmd/update.rb:204:in `block in report'
/usr/local/Library/Homebrew/cmd/update.rb:190:in `each_line'
/usr/local/Library/Homebrew/cmd/update.rb:190:in `report'
/usr/local/Library/Homebrew/cmd/update.rb:24:in `update'
/usr/local/Library/brew.rb:124:in `<main>'
VirgilMing commented 9 years ago

Ditto on rerunning brew update making the issue disappear.

Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX
Please report this bug:
    https://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/formulary.rb:226:in `loader_for'
/usr/local/Library/Homebrew/formulary.rb:176:in `factory'
/usr/local/Library/Homebrew/cmd/update.rb:204:in `block in report'
/usr/local/Library/Homebrew/cmd/update.rb:190:in `each_line'
/usr/local/Library/Homebrew/cmd/update.rb:190:in `report'
/usr/local/Library/Homebrew/cmd/update.rb:24:in `update'
/usr/local/Library/brew.rb:124:in `<main>'
walterdolce commented 9 years ago

True. Tried again and no issues. Not sure why it popped out at first though.

kordless commented 9 years ago

Same same. Happened during a demo of our software - at a conference - which uses brew for upgrading itself.

ashebanow commented 9 years ago

Same same.

tdterry commented 9 years ago

It had been awhile since I had brew updated. Tried today and got what everyone's been reporting. There was an error on the first run. I tried again, and didn't get an error. On neither run did it report actually updating any formula though.

$ brew update
Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX
Please report this bug:
    https://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/formulary.rb:226:in `loader_for'
/usr/local/Library/Homebrew/formulary.rb:176:in `factory'
/usr/local/Library/Homebrew/cmd/update.rb:173:in `block in report'
/usr/local/Library/Homebrew/cmd/update.rb:159:in `each_line'
/usr/local/Library/Homebrew/cmd/update.rb:159:in `report'
/usr/local/Library/Homebrew/cmd/update.rb:24:in `update'
/usr/local/Library/brew.rb:140:in `<main>'

$ brew update
Already up-to-date.
dunn commented 9 years ago

@tdterry the update does occur on the first brew update, but it runs into that error before it can print out the updated formulae. Run brew outdated to see what's new!

stevemao commented 9 years ago

Run brew update first time i see this issue. run it again its gone

sobolevn commented 9 years ago

The same here. After second run:

brew update
Updated Homebrew from f2a29d84 to f2a29d84.
andrade commented 9 years ago

Got the error, ran it again right afterwards and it worked fine. Reporting since I was asked to.

$ brew update && brew upgrade --all
Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX
Please report this bug:
    https://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/formulary.rb:226:in `loader_for'
/usr/local/Library/Homebrew/formulary.rb:176:in `factory'
/usr/local/Library/Homebrew/cmd/update.rb:204:in `block in report'
/usr/local/Library/Homebrew/cmd/update.rb:190:in `each_line'
/usr/local/Library/Homebrew/cmd/update.rb:190:in `report'
/usr/local/Library/Homebrew/cmd/update.rb:24:in `update'
/usr/local/Library/brew.rb:124:in `<main>'

$ brew update && brew upgrade --all
Updated Homebrew from f2a29d84 to f2a29d84.
... // all worked fine
==> Summary
🍺  /usr/local/Cellar/git/2.5.0: 1383 files, 32M
J-Swift commented 9 years ago

Ditto

$ brew update
Checking out files: 100% (2346/2346), done.
Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX
Please report this bug:
    https://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/formulary.rb:226:in `loader_for'
/usr/local/Library/Homebrew/formulary.rb:176:in `factory'
/usr/local/Library/Homebrew/cmd/update.rb:204:in `block in report'
/usr/local/Library/Homebrew/cmd/update.rb:190:in `each_line'
/usr/local/Library/Homebrew/cmd/update.rb:190:in `report'
/usr/local/Library/Homebrew/cmd/update.rb:24:in `update'
/usr/local/Library/brew.rb:125:in `<main>'

$ brew update
Updated Homebrew from 05956332 to 05956332.
skaht commented 9 years ago

Had the same issue with Homebrew installed in a non-standard location. After issuing the second "brew update" the issue vanished.

% brew update Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX Please report this bug: https://git.io/brew-troubleshooting /Users/XXX/usr/local/Homebrew/Library/Homebrew/formulary.rb:226:in loader_for /Users/XXX/usr/local/Homebrew/Library/Homebrew/formulary.rb:176:in factory /Users/XXX/usr/local/Homebrew/Library/Homebrew/cmd/update.rb:204:in block in report /Users/XXX/usr/local/Homebrew/Library/Homebrew/cmd/update.rb:190:in each_line /Users/XXX/usr/local/Homebrew/Library/Homebrew/cmd/update.rb:190:in report /Users/XXX/usr/local/Homebrew/Library/Homebrew/cmd/update.rb:24:in update /Users/XXX/usr/local/Homebrew/Library/brew.rb:124:in

% brew update Already up-to-date.

a613 commented 9 years ago

Already up-to-date.

Me too, but now I don't trust that it really is up to date. It returned a little too quickly for my liking.

MikeMcQuaid commented 9 years ago

Me too, but now I don't trust that it really is up to date. It returned a little too quickly for my liking.

It is up to date. That's a very quick operation to check in Git.

bitristan commented 9 years ago

Error: uninitialized constant Formulary::HOMEBREW_CORE_FORMULA_REGEX Please report this bug: https://git.io/brew-troubleshooting /usr/local/Library/Homebrew/formulary.rb:226:in loader_for' /usr/local/Library/Homebrew/formulary.rb:176:infactory' /usr/local/Library/Homebrew/cmd/update.rb:204:in block in report' /usr/local/Library/Homebrew/cmd/update.rb:190:ineach_line' /usr/local/Library/Homebrew/cmd/update.rb:190:in report' /usr/local/Library/Homebrew/cmd/update.rb:24:inupdate' /usr/local/Library/brew.rb:124:in `

'