Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Gems referenced from git repos cannot be installed when called from zsh #1024

goneflyin opened this Issue · 2 comments

3 participants


When a gem is referenced from a git repo:

gem 'acts_as_audited', :git => 'git://', :branch => 'rails3'

and the git repo has changed since the last call to bundle install, then the subsequent call to bundle install fails when zsh is used:

⚡ bundle install
Updating git://
zsh:1: no matches found: refs/heads/*:refs/heads/*
An error has occurred in git when running `git fetch --force --quiet --tags "git://" refs/heads/*:refs/heads/*`. Cannot complete bundling.

This occurs when bundle attempts to fetch the latest changes into its cached git repo. The failure is due to the fact that zsh will attempt to do file expansion on the git refspec: refs/heads/:refs/heads/ and trigger an error rather than pass it straight through to git.

This can be worked around by setting the zsh option NO_NOMATCH:


However, to avoid confusion by naive zsh users (as I myself was!), better to avoid the problem by quoting the refspec.

A pull request to fix this issue is forthcoming.


Is this not a duplicate of issue #941 ?


My bad -- I missed that one. Yes, it's the same. And the pull request I've created (attached to #1025) would also fix #941.

Apologies, I've not used Github's issue/pull-request system much. If I could delete #1024 and #1025, moving the pull request to #941 I'd do so. If anyone reading this can do so, please feel free.

@ixti ixti closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.