AnKing
AnKing

Reputation: 2174

Ruby gem install comes up with timeout error every time

Trying to install gems always comes up with error. Always have to download them manually thru browser for some reason. Is there something I'm missing here?

Here is install example:

$ gem install mysql2 --debug -V

NOTE: Debugging mode prints all exceptions even when rescued

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)

Upvotes: 1

Views: 1253

Answers (1)

Screenack
Screenack

Reputation: 757

This question is 7 months old now. As ipd references, on both Mac and Windows, temporarily disabling the IPv6 stack allowed my bundle install request to complete without hiccup.

Upvotes: 1

Related Questions