我正在尝试在我的 Arch Linux 计算机上安装 Rails。我遇到了我知道的网络问题 have already appeared here .我在任何地方都找不到满意的答案。
由于每次尝试时,gem
都无法下载不同的 gem(我认为所有这些都是 rails
的依赖项),我想尝试单独下载这些,并且仅当我都安装好了,再试试安装rails。
这是尝试安装 rails
的样子:
[lurch ~]$ time gem install rails
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::ETIMEDOUT: Connection timed out - connect(2) for "api.rubygems.org" port 443 (https://api.rubygems.org/api/v1/dependencies?gems=rails-html-sanitizer)
real 4m59.698s
user 0m1.170s
sys 0m0.117s
[lurch ~]$ gem install rails
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::ETIMEDOUT: Connection timed out - connect(2) for "api.rubygems.org" port 443 (https://api.rubygems.org/quick/Marshal.4.8/thread_safe-0.3.4.gemspec.rz)
[lurch ~]$ gem install rails
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::ETIMEDOUT: Connection timed out - connect(2) for "api.rubygems.org" port 443 (https://api.rubygems.org/api/v1/dependencies?gems=i18n)
[lurch ~]$ time gem install rails
ERROR: While executing gem ... (Gem::RemoteFetcher::UnknownHostError)
no such name (https://api.rubygems.org/api/v1/dependencies?gems=bundler)
real 1m28.495s
user 0m0.883s
sys 0m0.083s
[lurch ~]$ gem update --system
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::ETIMEDOUT: Connection timed out - connect(2) for "s3.amazonaws.com" port 443 (https://api.rubygems.org/specs.4.8.gz)
现在,我的问题是:从哪里可以获得 rails
的所有 gem 依赖项的列表? gem 依赖项
命令不起作用:
[lurch ~]$ gem dependency rails
No gems found matching rails (>= 0)
事实上,this documentation page将 gem 依赖项
命令描述为 [强调我的]“显示已安装 gem 的依赖项”。
所以,为了清楚起见,我的问题是:如何获取某个特定 gem 的所有 gem 依赖项的列表?当然,如果有人在命令gem install rails
中解决了奇怪的网络问题,我也会很高兴。
编辑:版本信息
[lurch ~]$ uname -a
Linux lurch 3.17.6-1-ARCH #1 SMP PREEMPT Sun Dec 7 23:43:32 UTC 2014 x86_64 GNU/Linux
[lurch ~]$ gem --version
2.2.2
[lurch ~]$ ruby --version
ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux]
最佳答案
我知道这有点死机,但我认为您可以使用 gem install --explain rails。
来自 http://guides.rubygems.org/command-reference/#gem-install
--explain - Rather than install the gems, indicate which would be installed
您可能必须从另一个可以访问 rubygems.org 服务器的系统运行该命令,获取 gem 列表,将它们拉下来,然后将它们安装到您的系统上,而不是直接点击 rubygems(直到您遇到网络问题想通了)
关于ruby-on-rails - 如何列出一些非安装的 gem 的 gem 依赖项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27697006/