尝试安装宝石总会出现错误。由于某种原因,始终必须通过浏览器手动下载它们。我在这里找不到什么东西?
这是安装示例:
$ gem install mysql2 --debug -V
注意:调试模式即使在获救时也会打印所有异常
Exception `Win32::Registry::Error' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0 /win32/registry.rb:250 - The system cannot find the file specified.
Exception `Win32::Registry::Error' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0 /win32/registry.rb:250 - The system cannot find the file specified.
Exception `Win32::Registry::Error' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0 /win32/registry.rb:250 - The system cannot find the file specified.
Exception `Win32::Registry::Error' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0 /win32/registry.rb:250 - The system cannot find the file specified.
Exception `Win32::Registry::Error' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0 /win32/registry.rb:250 - The system cannot find the file specified.
Exception `Win32::Registry::Error' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0 /win32/registry.rb:250 - The system cannot find the file specified.
Exception `Win32::Registry::Error' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0 /win32/registry.rb:250 - The system cannot find the file specified.
Exception `Win32::Registry::Error' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0 /win32/registry.rb:250 - The system cannot find the file specified.
Exception `Win32::Registry::Error' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0 /win32/registry.rb:250 - No more data is available.
Exception `Resolv::ResolvTimeout' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/ resolv.rb:694 - Resolv::ResolvTimeout
Exception `Net::OpenTimeout' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/net/http.rb:880 - execution expired
Exception `Net::OpenTimeout' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/net/http.rb:882 - execution expired
Exception `Net::OpenTimeout' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/timeout.rb:112 - execution expired
Exception `Gem::RemoteFetcher::UnknownHostError' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/remote_fetcher.rb:297 - timed out (https://api.rubygems.org/api/v1/dependencies)
Exception `Errno::EEXIST' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/fileutils.rb:253 - File exists @ dir_s_mkdir - C:/Users/anking/.gem/specs/api.rubygems.org%443
Exception `Net::OpenTimeout' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/net/http.rb:880 - execution expired
Exception `Net::OpenTimeout' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/net/http.rb:882 - execution expired
Exception `Net::OpenTimeout' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/timeout.rb:112 - execution expired
Exception `Gem::RemoteFetcher::UnknownHostError' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/remote_fetcher.rb:297 - timed out (https://api.rubygems.org/prerelease_specs.4.8.gz)
Exception `Errno::EEXIST' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/fileutils.rb:253 - File exists @ dir_s_mkdir - C:/Users/anking/.gem/specs/api.rubygems.org%443
Exception `Net::OpenTimeout' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/net/http.rb:880 - execution expired
Exception `Net::OpenTimeout' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/net/http.rb:882 - execution expired
Exception `Net::OpenTimeout' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/timeout.rb:112 - execution expired
Exception `Gem::RemoteFetcher::UnknownHostError' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/remote_fetcher.rb:297 - timed out (https://api.rubygems.org/specs.4.8.gz)
Exception `Gem::RemoteFetcher::UnknownHostError' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/spec_fetcher.rb:265 - timed out (https://api.rubygems.org/specs.4.8.gz)
Exception `Gem::UnsatisfiableDependencyError' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/resolver/installer_set.rb:71 - Unable to resolve dependency: user requested 'mysql2 (>= 0)'
ERROR: Could not find a valid gem 'mysql2' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - timed out (https://api.rubygems.org/specs.4.8.gz)
Exception `Errno::EEXIST' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/fileutils.rb:253 - File exists @ dir_s_mkdir - C:/Users/anking/.gem/specs/api.rubygems.org%443
Exception `Errno::ENOENT' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/remote_fetcher.rb:316 - No such file or directory @ rb_file_s_stat - C:/Users/anking/.gem/specs/api.rubygems.org%443/latest_specs.4.8
Exception `Net::OpenTimeout' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/net/http.rb:880 - execution expired
Exception `Net::OpenTimeout' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/net/http.rb:882 - execution expired
Exception `Net::OpenTimeout' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/timeout.rb:112 - execution expired
Exception `Gem::RemoteFetcher::UnknownHostError' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/remote_fetcher.rb:297 - timed out (https://api.rubygems.org/latest_specs.4.8.gz)
Exception `Gem::RemoteFetcher::UnknownHostError' at C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/spec_fetcher.rb:265 - timed out (https://api.rubygems.org/latest_specs.4.8.gz)
答案 0 :(得分:1)
这个问题现在已有7个月了。根据{{3}}的参考,在Mac和Windows上,暂时禁用IPv6堆栈使我的bundle install
请求得以顺利完成。