Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

unable to "bundle install" under Windows with git source #611

Closed
jarmo opened this issue Aug 25, 2010 · 10 comments
Closed

unable to "bundle install" under Windows with git source #611

jarmo opened this issue Aug 25, 2010 · 10 comments

Comments

@jarmo
Copy link
Contributor

jarmo commented Aug 25, 2010

In my Gemfile i have among other things:
gem 'authlogic', :git => 'git://github.com/odorcicd/authlogic.git', :branch => 'rails3'

And when trying to bundle install, i'm getting this strange failure. Same Gemfile and bundle install works under Ubuntu.

C:\project>bundle install
Fetching git://github.com/odorcicd/authlogic.git
remote: Counting objects: 3652, done.
remote: Compressing objects: 100% (1189/1189), done.
remote: Total 3652 (delta 2378), reused 3578 (delta 2341)
Receiving objects: 100% (3652/3652), 589.85 KiB | 80 KiB/s, done.
Resolving deltas: 100% (2378/2378), done.
Unable to open connection:
gethostbyname: unknown errorfatal: The remote end hung up unexpectedly
An error has occurred in git when running `git fetch --force --quiet 'C:/bin/pik/Ruby-187-p302/lib/ruby/g
ems/1.8/cache/bundler/git/authlogic-6baa44cd7023e0828fc87e150aa82c0caeeb7c3d'. Cannot complete bundling.

I'm on win7 64bit, git version 1.7.0.2.msysgit.0 and rails3 rc2.

Any ideas, what's causing that and how to solve it?

@luislavena
Copy link
Member

If you invoke the command indicated in the backticks, it works?

git fetch --force --quiet 'C:/bin/pik/Ruby-187-p302/lib/ruby/g ems/1.8/cache/bundler/git/authlogic-6baa44cd7023e0828fc87e150aa82c0caeeb7c3d'

@jarmo
Copy link
Contributor Author

jarmo commented Aug 25, 2010

No. In Windows double quotes are necessary instead of single ones. Made pull request for this change http://github.com/jarmo/bundler/commit/889ced04a1915370eff9ea5a1ea32ce82c517234

@PatrickGannon
Copy link

I had the same problem (on Win7 32-bit), and your change fixed me up. I just applied it to my locally installed bundler gem (in hopes this will be fixed by the time there's another version) and did a happy dance. Thanks @jarmo!

@jhandel
Copy link

jhandel commented Aug 27, 2010

I just ran into this yesterday.. Cost me a few hours.. I am so glad I found this issue.. Sure hope they fix it for the 1.0 release when rails goes gold!

Thanks for the temp-fix

@indirect
Copy link
Member

This is fixed in the 1.0 final release, so I'm closing this ticket.

@spyderdyne
Copy link

not fixed. having the same issue on Windoze 7 64 bit with bundler gem version 1.2.4

@indirect
Copy link
Member

@spyderdyne you have a different problem. Chances are highest that you don't have git installed, but you should check out ISSUES for more.

@spyderdyne
Copy link

I have git and git bash installed. Even working out of a got cloned repo
trying to run bundle install. Tried downloading curl and adding the path to
my environment variables. No-go. Tried installing with cygwin. Also no-go.

It looks pretty similar to me.
On Feb 19, 2013 11:36 AM, "André Arko" notifications@github.com wrote:

@spyderdyne https://github.com/spyderdyne you have a different problem.
Chances are highest that you don't have git installed, but you should check
out ISSUES https://github.com/carlhuda/bundler/blob/master/ISSUES.mdfor more.


Reply to this email directly or view it on GitHubhttps://github.com//issues/611#issuecomment-13785842.

@hakanai
Copy link

hakanai commented Jun 16, 2017

We saw this in 2017, on a current version of bundler running under JRuby:

 An error occurred while installing diff-lcs (1.3), and Bundler cannot continue.
 Make sure that `gem install diff-lcs -v '1.3'` succeeds before bundling.

That command does indeed fail, but with double-quotes it works fine. Not entirely sure whether the error message is just wrong, or whether bundler is actually running that command.

@iongion
Copy link

iongion commented Nov 8, 2018

This issue is still there, I cannot go pass gem installation if they reference github repos.

Using msys2 installer from http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20180531.exe

$ ruby --version
ruby 2.5.3p105 (2018-10-18 revision 65156) [x64-mingw32]
$ which ruby
/mingw64/bin/ruby
$ gem --version
2.7.8
$ bundle --version
Bundler version 1.17.1
$ git --version
git version 2.19.1

Any ideas ?

Errors start like this:

$ bundle install
Fetching gem metadata from http://rubygems.org/.......
ssh: Could not resolve hostname w: Name or service not known
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Retrying `git fetch --force --quiet --tags "W:/SDKs/msys2/mingw64/lib/ruby/gems/2.5.0/cache/bundler/git/myrrha-135c8108da926f13af4a2d3d2ae87d75eb992687"` due to error (2/4): Bundler::Source::Git::GitCommandError Git error: command `git fetch --force --quiet --tags "W:/SDKs/msys2/mingw64/lib/ruby/gems/2.5.0/cache/bundler/git/myrrha-135c8108da926f13af4a2d3d2ae87d75eb992687"` in directory W:/SDKs/msys2/mingw64/lib/ruby/gems/2.5.0/bundler/gems/myrrha-09351e7ceb71 has failed.
If this error persists you could try removing the cache directory 'W:/SDKs/msys2/mingw64/lib/ruby/gems/2.5.0/cache/bundler/git/myrrha-135c8108da926f13af4a2d3d2ae87d75eb992687'ssh: Could not resolve hostname w: Name or service not known
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

It looks more like a git CLI problem, not being able to identify that W: is a drive letter

This is solved by replacing the msys2's own git client with the one from git-for-windows, check here https://github.com/git-for-windows/git/wiki/Install-inside-MSYS2-proper

So, not a bundler problem in the end!

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants