Empty vendor/cache folder causes Capistrano deployments to fail #1454

Closed
dleavitt opened this Issue Sep 28, 2011 · 7 comments

Comments

Projects
None yet
6 participants

My vendor/cache directory is checked in with its contents ignored. On deploying, the bundle:install cap task fails with the following message:
Some gems seem to be missing from your vendor/cache directory.

Removing the vendor/cache directory from version control solves the problem.

This only seems to occur through Capistrano. Running the same bundle install command on the server seems to work fine.

It would be nice to put a note about this in the docs, I suspect it may be tripping up other people:
carlhuda#1345
http://stackoverflow.com/questions/5958614/how-can-i-add-gems-to-my-vendor-cache-directory-in-a-rails-3-app

rvm 1.8.4
ruby 1.9.2p290
Bundler version 1.0.18
Capistrano v2.9.0

der-flo commented Feb 24, 2012

+1

leonels commented Jun 6, 2012

Same problem here.

Being more specific, do you mean adding vendor/cache to .gitignore?

moll commented May 25, 2013

Did you find a solution to this?

moll commented May 25, 2013

I found a workaround around the vendor/cache install round. Removing --deployment lets the bastard continue installing from all sources, both vendor/cache and Rubygems. You might want to add --no-cache back, otherwise it may fill the vendor/cache directory needlessly.

Contributor

xaviershay commented Aug 11, 2013

This feels like a problem with capistrano to me. Re-open with a full repro.

(Why do you have vendor/cache checked in anyway?)

@xaviershay xaviershay closed this Aug 11, 2013

moll commented Aug 11, 2013

I use vendor/cache to store a copy of a single gem that's not public. Everything else should still be grabbed from rubygems.org.

cthielen commented Oct 9, 2013

Ran into this issue too - needed to use ruby-net-ldap repo (gem is called net-ldap) from github as the original authors have gone AWOL and aren't updating the rubygems.org entry. Copy of the gem in git is marked 0.5.0, which I required to ensure certain bugs didn't exist in production due to an older version of the gem (rubygems.org version) being used.

Works fine locally but via capistrano I get this gem missing from vendor/cache/ error, saying it can't find version 0.5.0.

Removing vendor/cache/ from my repo fixed the issue but it seems like having preferred copies of gems in vendor/cache/ is a good idea.

Also removing --deployment fixes the issue but it seems Bundler should have been able to use the git copy of ruby-net-ldap that was found in vendor/cache/.

I don't know much about investigating the issue but it smells like Bundler's fault, not Capistrano. The same commands run via SSH (avoiding Capistrano) also produce the error.

Sorry I don't have a test case, it's a somewhat complicated set up.

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