Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

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

goneflyin opened this Issue Feb 8, 2011 · 2 comments


None yet
3 participants

When a gem is referenced from a git repo:

gem 'acts_as_audited', :git => 'git://github.com/dlkinney/acts_as_audited.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://github.com/dlkinney/acts_as_audited.git
zsh:1: no matches found: refs/heads/*:refs/heads/*
An error has occurred in git when running `git fetch --force --quiet --tags "git://github.com/dlkinney/acts_as_audited.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.

indirect pushed a commit that referenced this issue May 3, 2011

@ixti ixti closed this Jul 31, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment