捆绑更新停留在“获取http://rubygems.org/的源索引”

时间:2021-07-28 00:22:37

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.

截至昨天,我无法更新我的捆绑包。它陷入了“获取http://rubygems.org/的源索引”。我知道这通常需要一段时间,但我已经等了几个小时,并在最后一天尝试了几次。我有20 Mbit的互联网连接。

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

我在Macbook上使用gem 1.8.5,Bundler版本1.0.15,rvm 0.1.46,ruby-1.9.2-p0 [x86_64]和Rails 3.0.8。 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 Update的原因是因为捆绑设置直到最近才设置为0.8.7(不确定原因),但是rake开始要求我升级到0.9.2。所以我改变了Gemfile。 Bundle Install告诉我:

  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 / config包含:

---
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:

我甚至尝试删除Gemfile.lock,在rvm中重新安装ruby版本并删除所有gem:

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 个解决方案

#1


6  

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.

注释掉所有gems并为rails(例如3.0.8)和rake(例如0.9.2)设置显式版本。然后只需运行rake,cucumber和服务器,看看你真正需要哪些宝石,然后手动逐一添加。

#2


1  

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

我在“获取http://rubygems.org/的源索引”时遇到了同样的问题。

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

在我的例子中,它通过使用rubygems现代索引而不是API端点来解决:

bundle install --full-index

#3


0  

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.

我检查了Gemfile.lock并将特定版本(例如〜> 1.3.0)添加到Gemfile中没有的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.

通过做出接受的答案并通过gem取消注释gem,我发现错误是由于不兼容的gem依赖性。也许分辨率算法陷入了循环。

#1


6  

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.

注释掉所有gems并为rails(例如3.0.8)和rake(例如0.9.2)设置显式版本。然后只需运行rake,cucumber和服务器,看看你真正需要哪些宝石,然后手动逐一添加。

#2


1  

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

我在“获取http://rubygems.org/的源索引”时遇到了同样的问题。

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

在我的例子中,它通过使用rubygems现代索引而不是API端点来解决:

bundle install --full-index

#3


0  

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.

我检查了Gemfile.lock并将特定版本(例如〜> 1.3.0)添加到Gemfile中没有的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.

通过做出接受的答案并通过gem取消注释gem,我发现错误是由于不兼容的gem依赖性。也许分辨率算法陷入了循环。