# MacOS build fails because of homebrew "bundle" unknown command

**URL:** <https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296>\
**Category:** macOS\
**Created:** [February 20, 2020, 5:16pm UTC](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296 "2020-02-20T17:16:45Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![lgblgblgb](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/lgblgblgb/32/3870_2.png) [@lgblgblgb](https://travis-ci.community/u/lgblgblgb)\
**Post date:** [February 20, 2020, 5:16pm UTC](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/1 "2020-02-20T17:16:46Z")

</div>

The same thing which worked since months today stopped working with this mystical message I have no idea what it means. Can somebody help? it seems this “bundle” is actually done by Travis, I haven’t requested to tap anything like that. So it does not recognize its own command? Unfortunately I have no experience on MacOS, I just tried to work out a solution to build project for MacOS (I even haven’t got a Mac).

```
Installing Homebrew Packages
7.40s$ rvm $brew_ruby do brew bundle --verbose --global
/usr/local/bin/brew tap homebrew/bundle
==> Tapping homebrew/bundle
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle'...
Tapped (192 files, 262.7KB).
Error: Unknown command: bundle

```

The relevant part from .travis.yml:

```
- name: MacOS native compilation
  os: osx
  osx_image: xcode11
  addons:
    homebrew:
      packages:
        - create-dmg
        - sdl2
  before_script:

```

See here: [https://travis-ci.org/lgblgblgb/xemu/jobs/653044049](https://travis-ci.org/lgblgblgb/xemu/jobs/653044049)

“Installing Homebrew Packages” there contains the problem I’ve quoted here before.

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [February 20, 2020, 6:59pm UTC](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/2 "2020-02-20T18:59:06Z")

</div>

When reporting problems, please include relevant build URLs. Thanks.

---

<div class="post-metadata">

**Author:** ![ITProKyle](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/itprokyle/32/3871_2.png) [@ITProKyle](https://travis-ci.community/u/ITProKyle)\
**Post date:** [February 20, 2020, 7:00pm UTC](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/3 "2020-02-20T19:00:09Z")

</div>

I am seeing this error as well - [https://travis-ci.org/onicagroup/runway/jobs/653104300#L103](https://travis-ci.org/onicagroup/runway/jobs/653104300#L103)

---

<div class="post-metadata">

**Author:** ![lgblgblgb](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/lgblgblgb/32/3870_2.png) [@lgblgblgb](https://travis-ci.community/u/lgblgblgb)\
**Post date:** [February 20, 2020, 7:01pm UTC](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/4 "2020-02-20T19:01:18Z")

</div>

Oh, sorry for lacking that. I’ve just edited the post, thanks for the “clarification request”.

---

<div class="post-metadata">

**Author:** ![akien-mga](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/akien-mga/32/3875_2.png) [@akien-mga](https://travis-ci.community/u/akien-mga)\
**Post date:** [February 20, 2020, 8:00pm UTC](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/5 "2020-02-20T20:00:11Z")

</div>

Confirmed on [https://github.com/godotengine/godot](https://github.com/godotengine/godot), all macOS builds have been failing for the past 5 hours with the same “bundle” issue. Builds older than 6 hours ago were working fine.

Failed build (15:02 UTC): [https://travis-ci.org/godotengine/godot/builds/653014481](https://travis-ci.org/godotengine/godot/builds/653014481)  
Working build (13:30 UTC): [https://travis-ci.org/godotengine/godot/builds/652978826](https://travis-ci.org/godotengine/godot/builds/652978826)

Relevant matrix config: [https://github.com/godotengine/godot/blob/master/.travis.yml#L71-L79](https://github.com/godotengine/godot/blob/master/.travis.yml#L71-L79)

---

<div class="post-metadata">

**Author:** ![lgblgblgb](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/lgblgblgb/32/3870_2.png) [@lgblgblgb](https://travis-ci.community/u/lgblgblgb)\
**Post date:** [February 20, 2020, 8:13pm UTC](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/6 "2020-02-20T20:13:52Z")

</div>

By the way, I put `brew update` and then `brew install ...` commands into my `.travis.yml` now. It did the trick as a kind of workaround, it seems, however now it’s about four minutes longer to finish … I guess this is not the optimal solution after all, and also hides the problem why it does not work anymore since some hours which worked before …

---

<div class="post-metadata">

**Author:** ![lgblgblgb](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/lgblgblgb/32/3870_2.png) [@lgblgblgb](https://travis-ci.community/u/lgblgblgb)\
**Post date:** [February 20, 2020, 8:37pm UTC](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/7 "2020-02-20T20:37:24Z")

</div>

Indeed, yesterday it worked fine yet, today did not … I wouldn’t have any more precise timing though when the problem occurred the first time …

---

<div class="post-metadata">

**Author:** ![casconed](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/casconed/32/3877_2.png) [@casconed](https://travis-ci.community/u/casconed)\
**Post date:** [February 20, 2020, 9:55pm UTC](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/8 "2020-02-20T21:55:38Z")

</div>

Experiencing the same issue

---

<div class="post-metadata">

**Author:** ![mriesch-tum](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@mriesch-tum](https://travis-ci.community/u/mriesch-tum)\
**Post date:** [February 20, 2020, 10:09pm UTC](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/9 "2020-02-20T22:09:51Z")

</div>

Same [here](https://travis-ci.org/mriesch-tum/mbsolve/jobs/653193977).

Short web search told me that homebrew bundle has been announced as deprecated – it seems to have vanished now. I do not use macOS personally, but offering support for it would be quite nice. Thanks in advance!

---

<div class="post-metadata">

**Author:** ![casconed](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/casconed/32/3877_2.png) [@casconed](https://travis-ci.community/u/casconed)\
**Post date:** [February 20, 2020, 10:17pm UTC](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/10 "2020-02-20T22:17:31Z")

</div>

Seems like this commit:

> <https://github.com/Homebrew/homebrew-bundle/commit/b4610171740afa085dfb6524436b0365a92b9222>
>
> This helps us with consistent help output, parsing invalid options and
> accessing… options without using \`ARGV\` directly.
> 
> While we're here: cleanup some old checks that are no longer needed and
> simplify \`cmd/brew-bundle.rb\`.

broke the installation of that tap. In order to provide external commands (like `brew bundle`) Homebrew expects a file `brew-bundle.rb`, which has been deleted from the repo (or renamed `bundle.rb`

From this issue: [Unknown command: bundle · Issue #646 · Homebrew/homebrew-bundle · GitHub](https://github.com/Homebrew/homebrew-bundle/issues/646) it seems like `brew update` might fix the issue. Would be nice if the Travis team could update the build image, rather than requiring us to run `brew update` on every build. As you note in your docs:

> By default, the Homebrew addon will not run `brew update` before installing packages. `brew update` can take a long time and slow down your builds.

edit: confirming that adding `update: true` fixes my build.

```auto
    addons:
      homebrew:
        packages:
        - graphicsmagick
        update: true

```

---

<div class="post-metadata">

**Author:** ![casconed](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/casconed/32/3877_2.png) [@casconed](https://travis-ci.community/u/casconed)\
**Post date:** [February 20, 2020, 10:19pm UTC](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/11 "2020-02-20T22:19:44Z")

</div>

Can you provide a link to the deprecation announcement? I can’t find that anywhere.

---

<div class="post-metadata">

**Author:** ![mriesch-tum](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@mriesch-tum](https://travis-ci.community/u/mriesch-tum)\
**Post date:** [February 20, 2020, 10:26pm UTC](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/12 "2020-02-20T22:26:41Z")

</div>

I stumbled over this [SO question](https://apple.stackexchange.com/q/148454), which points to [this issue](https://github.com/Homebrew/legacy-homebrew/issues/32952). Just realized, however, that those links are quite dated.

---

<div class="post-metadata">

**Author:** ![mriesch-tum](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@mriesch-tum](https://travis-ci.community/u/mriesch-tum)\
**Post date:** [February 20, 2020, 11:15pm UTC](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/13 "2020-02-20T23:15:26Z")

</div>

Thanks a lot!

```
update: true

```

works for me as well. Takes a while, though, but at least the build runs now.

---

<div class="post-metadata">

**Author:** ![nottheoilrig](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/nottheoilrig/32/3879_2.png) [@nottheoilrig](https://travis-ci.community/u/nottheoilrig)\
**Post date:** [February 20, 2020, 11:18pm UTC](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/14 "2020-02-20T23:18:56Z")

</div>

How frequently do the macOS virtual machines receive updates?

My understanding is that [Homebrew Bundle](https://github.com/Homebrew/homebrew-bundle), which the [Homebrew addon](https://docs.travis-ci.com/user/installing-dependencies#installing-packages-on-macos) uses, now depends on [Homebrew 2.2.5](https://github.com/Homebrew/homebrew-bundle/issues/646#issuecomment-589393926), and the macOS virtual machines currently ship an older version.

Until the virtual machines receive an update, or something else changes, the workaround is to update it via [`update: true`](https://docs.travis-ci.com/user/installing-dependencies#installing-packages-on-macos), as above.

---

<div class="post-metadata">

**Author:** ![nottheoilrig](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/nottheoilrig/32/3879_2.png) [@nottheoilrig](https://travis-ci.community/u/nottheoilrig)\
**Post date:** [February 21, 2020, 7:25pm UTC](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/15 "2020-02-21T19:25:24Z")

</div>

I opened a [macOS Packer Templates PR](https://github.com/travis-ci/packer-templates-mac/pull/13) to add Homebrew Bundle to the macOS images and avoid mismatches between the installed (stale) version of Homebrew and latest version of Homebrew Bundle.

---

<div class="post-metadata">

**Author:** ![AJenbo](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/ajenbo/32/3893_2.png) [@AJenbo](https://travis-ci.community/u/AJenbo)\
**Post date:** [February 22, 2020, 5:07pm UTC](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/16 "2020-02-22T17:07:07Z")

</div>

They say they are thinking about it, but not very hard apparently: [https://twitter.com/AJenbo/status/1175976531480457216](https://twitter.com/AJenbo/status/1175976531480457216)

---

<div class="post-metadata">

**Author:** ![Wohlstand](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/wohlstand/32/3895_2.png) [@Wohlstand](https://travis-ci.community/u/Wohlstand)\
**Post date:** [February 22, 2020, 8:29pm UTC](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/17 "2020-02-22T20:29:18Z")

</div>

I also have the same issue with many of my projects:

- [https://travis-ci.org/WohlSoft/PGE-Project/jobs/653807984](https://travis-ci.org/WohlSoft/PGE-Project/jobs/653807984)
- [https://travis-ci.org/Wohlstand/libADLMIDI/jobs/653778216](https://travis-ci.org/Wohlstand/libADLMIDI/jobs/653778216)
- [https://travis-ci.org/Wohlstand/libOPNMIDI/jobs/653778071](https://travis-ci.org/Wohlstand/libOPNMIDI/jobs/653778071)

---

<div class="post-metadata">

**Author:** ![McSinyx](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/mcsinyx/32/3725_2.png) [@McSinyx](https://travis-ci.community/u/McSinyx)\
**Post date:** [February 29, 2020, 11:06am UTC](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/18 "2020-02-29T11:06:01Z")

</div>

We have the same problem too: [https://travis-ci.org/kcat/alure/jobs/656584032](https://travis-ci.org/kcat/alure/jobs/656584032)

---

<div class="post-metadata">

**Author:** ![noloader](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/noloader/32/2971_2.png) [@noloader](https://travis-ci.community/u/noloader)\
**Post date:** [March 11, 2020, 5:51pm UTC](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/19 "2020-03-11T17:51:21Z")

</div>

Add `update: true` under the `homebrew:` key in your environment.

Thanks to @BanzaiMan. Also see [OS X image and “Error: Unknown command: bundle”](https://travis-ci.community/t/os-x-image-and-error-unknown-command-bundle/7493) and [MacOS build fails because of homebrew “bundle” unknown command](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296).

---

<div class="post-metadata">

**Author:** ![akien-mga](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/akien-mga/32/3875_2.png) [@akien-mga](https://travis-ci.community/u/akien-mga)\
**Post date:** [March 16, 2020, 11:55am UTC](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/20 "2020-03-16T11:55:00Z")

</div>

@BanzaiMan Can we expect an updated macOS image in coming days to solve this? Having Homebrew updated to a current functional version directly in the image should reduce build times for all of us who currently had to resort to forcing `update: true` in our builds.

[Next page](https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296.md?page=2)
