【问题标题】:IOError: HTTP session not yet started when running [gem install bundler]IOError:运行 [gem install bundler] 时 HTTP 会话尚未启动
【发布时间】:2021-08-23 10:06:12
【问题描述】:

我尝试使用 gem install bundler 安装 bundler,但是,我收到以下错误消息:

ERROR:  Could not find a valid gem 'bundler' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - IOError: HTTP session not yet started (https://rubygems.org/specs.4.8.gz)

另外,我尝试使用 gem install webpacker 安装 webpacker,但收到以下错误消息:

ERROR:  Could not find a valid gem 'webpacker' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - timed out (https://rubygems.org/specs.4.8.gz)

谁能帮我解决这两个问题?我在 Google 上搜索过,但没有找到有效的答案。

我在 M1 芯片 macOS Big Sur 11.4 上使用 rvm 安装了 ruby​​-2.7.2。

谢谢谢谢谢谢!!!

【问题讨论】:

  • 好的,我对此的更新:我退出安装过程,然后重新启动它(多次执行此操作),现在 gem install bundlergem install rails 为我工作(没有改变任何东西,工作无缘无故????),但gem install webpacker仍然没有回应。

标签: ruby-on-rails ruby rvm


【解决方案1】:

您似乎没有访问 ruby​​gems.org。这可能是您的授权问题。确保 api.rubygems.org 被正确授权。

你可以通过运行curl https://api.rubygems.org/specs.4.8.gz来测试它

【讨论】:

    猜你喜欢
    • 2013-05-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-10-14
    • 2022-01-01
    相关资源
    最近更新 更多