Sjors Provoost
Sjors Provoost

Reputation: 1931

Bundle Update stuck at "Fetching source index for http://rubygems.org/"

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

Upvotes: 11

Views: 12222

Answers (3)

Pavel K
Pavel K

Reputation: 371

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

Upvotes: 1

guzart
guzart

Reputation: 3730

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.

Upvotes: 0

Sjors Provoost
Sjors Provoost

Reputation: 1931

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.

Upvotes: 9

Related Questions