You can clone with
HTTPS or Subversion.
I often find that Bundler hangs indefinitely waiting for a network operation to complete (at least, I think that it's a network operation because things like bundle check which don't hit the network never hang, whereas things like bundle install and bundle update hang all the time).
A typical example: clone the Rails repo (fresh clone, no Gemfile.lock yet) and do bundle install:
Fetching source index for http://rubygems.org/
Using rake (0.8.7)
Using abstract (1.0.0)
Using nokogiri (1.4.2)
Using pg (0.9.0)
At that point it just hangs for four minutes. I generally have to CTRL-C these operations and keep retrying until they succeed. I retry again, it hangs at "Using pg", and this time continues on to "Using thor" and succeeds.
I guess what I want here is either one of two things:
It's not clear to me why it should hang at "pg" like that for several minutes. What was it trying to do? The pg gem is already installed on the system, as is thor, so it doesn't seem like it should be trying to fetch them. And because Bundler catches the Interrupt when I press CTRL-C, I can't see a backtrace to know where/what it was doing during the hang.
I'm running Little Snitch here, so I could see that at the beginning of the bundle install it makes an outbound connection (right after printing "Fetching source index for http://rubygems.org/"). Then after hanging for several minutes it makes another. Both of these connections go to amazon hosts, seeing as that's where gemcutter hosts. So yes, it definitely does seem network related.
Anyway, the exact example here doesn't really matter, as it's something I've seen in various projects across several versions of Bundler.
What do you think about adding a network timeout and/or a --verbose switch?
+1 getting same issue, a verbose switch would be great, or is their a log file?
Assuming it really is stalling out during the fetch, another option would be to locally cache the source index, then expire it after, say, an hour or a day so it wouldn't get too stale. I do a lot of rvm stuff and it's quite annoying having to wait when I know that it just fetched the darn index...
+1 This is a really annoying problem
+1 bundle install or update when dependency changed is too slow,
it takes 6 minute!!! in a small rails project. It's annoying.
I don't know why it slow, can someone analyze it?, and improve it.
+1, my bundler is timing out completely, and I can't get anything deployed!
Bundle update is hanging, but issuing a bundle update somegem works fine. I second the request for a verbose flag and/or log file.
+1 having the same problem. Ruby 1.9.2, Rails 3, typical Gemfile.
Doing "bundle install" prints "Fetching source index for http://rubygems.org/"
Then hangs. Installing each gem using "gem install" works fine.
Good explanation here: http://robots.thoughtbot.com/post/2729333530/fetching-source-index-for-http-rubygems-org
Guys, is this still an issue with Bundler 1.1.1?
Still an issue with 1.2.4 - explanation linked by @SixArm looks intriguing.
Ah, sorry about that, apparently I was somehow mixing bundler versions. 1.2.4 seems to move quickly - at least it has progress indicators.
Closing this because:
Patches welcome for timeout or verbose options.