Created
February 12, 2010 13:49
-
-
Save jeroenvandijk/302569 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you get this error: | |
~/current$ bundle install | |
Updating git://github.com/rails/rails.git | |
Fetching source index from http://gemcutter.org | |
Resolving dependencies | |
[..] | |
Installing actionmailer (3.0.0.beta) from git://github.com/rails/rails.git (at master) fatal: destination directory '/var/www/frontend/.bundle/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master' already exists. | |
fatal: Not a git repository | |
An error has occurred in git. Cannot complete bundling. | |
Then you need to replace the method `Bundler::Souce::Git#checkout` (in `lib/bundler/source.rb`) to read: | |
def checkout | |
unless File.exists?(File.join(path, '.git')) | |
FileUtils.remove_dir(path, force = true) | |
%x(git clone --no-checkout #{cache_path} #{path}) | |
end | |
Dir.chdir(path) do | |
git "fetch --quiet" | |
git "reset --hard #{revision}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment