10
votes

As of yesterday, I'm unable to update my bundle. It gets stuck at "Fetching source index for http://rubygems.org/". I know this usually takes a while, but I've waited for hours and tried several times over the last day. I have a 20 Mbit internet connection.

I'm using gem 1.8.5, Bundler version 1.0.15, rvm 0.1.46, ruby-1.9.2-p0 [ x86_64 ] and Rails 3.0.8 on a Macbook. Gemfile: https://gist.github.com/1028832

The reason I'm trying to run Bundle Update is because the bundle was set to rake 0.8.7 until recently (not sure why), but rake started demanding that I move up to 0.9.2. So I changed the Gemfile. Bundle Install tells me to:

  bundle install
  Fetching source index for http://rubygems.org/
  You have requested:
  rake >= 0.9.2

  The bundle currently has rake locked at 0.8.7.
  Try running `bundle update rake`

My .bundle/config contains:

---
BUNDLE_DISABLE_SHARED_GEMS: "1"
BUNDLE_WITHOUT: production

I'm not behind a proxy.

I even tried deleting Gemfile.lock, reinstalling the ruby version in rvm and deleting all gems:

rm Gemfile.lock
rvm uninstall 1.9.2
rvm install 1.9.2
for x in `gem list --no-versions`;do gem uninstall $x -aIx;done
gem install bundle
bundle install
3
Sjors, if you try and install the gems manually what happens? Could b e problem with an http proxy? Or something in your .bundle/config maybe?Matthew Rudy
I'm trying to make it use rake 0.9.2 in stead of 1.8.7, which was hard coded in the Gemfile before for some reason. Both versions are already installed on the system.Sjors Provoost
if you are really stuck. try deleting your Gemfile.lock, and trying againMatthew Rudy
@mark yes, I actually linked to it in my question. It should take minutes, but not hours.Sjors Provoost

3 Answers

7
votes

Comment out all gems and set explicit versions for rails (e.g. 3.0.8) and rake (e.g. 0.9.2). Then just run rake, cucumber and the server to see which gems you really need and add them back one by one manually.

1
votes

I had the same problem with jam at “Fetching source index for http://rubygems.org/

In my case it was solved by using the rubygems modern index instead of the API endpoint:

bundle install --full-index
0
votes

I checked the Gemfile.lock and added the specific version (e.g. ~> 1.3.0) to the gems that had none in the Gemfile. Found out to be faster, than uncommenting gem by gem.

By doing the accepted answer and uncommenting gem by gem, I found that the error was due to incompatible gem dependencies. Maybe the resolution algorithm was stuck in a loop.