You can clone with
HTTPS or Subversion.
tl;dr: double-quote everything on Windows, after replacing double-quotes with two double-quotes
bundle install fails with:
fatal: I don't handle protocol ''https'
Git error: command git clone 'https://github.com/bborn/authlogic.git' "c:/Ruby192/lib/ruby/gems/1.9.1/cache/bundler/git/authlogic-d886115472ee6d482cf48f3e903527ef78df0048" --bare --no-hardlinks in directory c:/Ruby192/apps/communityengine has failed.
git clone 'https://github.com/bborn/authlogic.git' "c:/Ruby192/lib/ruby/gems/1.9.1/cache/bundler/git/authlogic-d886115472ee6d482cf48f3e903527ef78df0048" --bare --no-hardlinks
This will run fine on the cmd line.
This happens on any and all references to a git repo in gemfiles.
more details here:
That would be nice and simple, but I only have one git binary installed.
As you've probably noticed, the error that you're seeing is actually just Bundler re-raising the error that it got when it shelled out to git with system('git clone ...'). That means, for whatever reason, your git binary is throwing that error. It's not something I can fix by changing Bundler. You might be able to figure out what's going on by patching Bundler to print the path when it shells out to git, or print git --version or something like that.
system('git clone ...')
yeah, I did that. It is unilluminating. I reverted to 1.0.13 of bundler and it works just fine.
Well, that's at least helpful for narrowing it down... as far as I know, the only change to git between 1.0.13 and 1.0.14 was to escape git URLs more completely, in commit 4fc8385. Does that change break things for you? If it does, is there a different "correct" way to escape single quotes on Windows? Thanks.
fatal: I don't handle protocol ''https'
That actually looks as if git was treating the single-quote as part of the protocol.
Yep, that appears to be the issue. Looks like we need to implement separate shell-escaping logic on Windows, but I don't know the secret incantations that allow you to quote strings on Windows... can either of you comment on that?
In think you use double quotes, and escape them by doubling them (yo dawg :>). At least with Win NT 4.0, but I guess it didn't change.
Ow, my brain. Alright, then, we'll just have to adjust the escaping method to check for Windows and use double (double (double)) quotes instead. Thanks for reporting!
Too bad google did not index this yet.
Mmh, looks like escaping changed after NT4: http://stackoverflow.com/questions/2403647/how-to-escape-parameter-in-windows-command-line
So in Win7 you basically escape like in Bash, but always with double quotes. I guess someone with a Windows machine needs to do a bit of testing on this.
still not working for me on Windows 7 using Bundler version 1.0.14. The previous version works fine.
@neebz: I haven't had a chance to try a fix, but if you would like to take a try is it uri_escaped in source.rb.
So was a fix for this committed?
Nope, no fix yet. A patch for the uri_escaped method in lib/bundler/source.rb would be the place to fix it, and you will probably just need to add something like if Bundler::WINDOWS and do Windows escaping instead.
escape git URIs correctly on Windows
The fix in 4794327 seems to work for me. Could someone else please test it and let me know if it works for them, too? Thanks.
It seems to work for me too.
Great! I'll be releasing a new version of Bundler with this fix (among others) later today. Thanks for testing!
I have the same dont handle https error. How do I install the previous bundle version 1.0.13?
The fix mentioned above seems to work fine. Otherwise just 'gem unsintall bundler' and "gem install bundler -v '1.0.13'"
Hello, I did installed the latested version everything appeared to went smoothly (no error messages), but after bundle install when I ran rake db:migrate is said: "Could not find kgio-2.1.1 in any of the sources. Try running 'bundlle install'". How can I solve this? Thank you!
Sorry, there actually was an error within the bundle install. Tks, André.