$ rvm use Using /home/owner/.rvm/gems/ruby-2.1.2 $ gem install rails ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) Errno::ECONNREFUSED: Connection refused - connect(2) for "your-dns-needs-immediate-attention.network" port 80 (http://your-dns-needs-immediate-attention.network/quick/Marshal.4.8/thread_safe-0.3.4.gemspec.rz) $ gem update --system ... $ gem -v 2.4.1 $ gem install rails ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) Errno::ECONNREFUSED: Connection refused - connect(2) for "your-dns-needs-immediate-attention.network" port 80 (http://your-dns-needs-immediate-attention.network/quick/Marshal.4.8/rails-4.1.5.gemspec.rz)
I have attempted:
gem update --system
https://production.cf.rubygems.org
as a gem source (see below for error)https://rubygems.org/
through my browser$ curl -v --head https://rubygems.org
output: http://pastebin.com/ca6DAvaU $ cat /etc/resolv.co # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 8.8.8.8 nameserver 8.8.4.4 nameserver 75.75.75.75 search home.network
Ref: https://stackoverflow.com/a/19299266/3993020
owner@owner-Z87X-UD3H:~$ gem sources --add https://production.cf.rubygems.org Error fetching https://production.cf.rubygems.org: Errno::ECONNREFUSED: Connection refused - connect(2) for "your-dns-needs-immediate-attention.network" port 443 (https://your-dns-needs-immediate-attention.network/specs.4.8.gz)
gem install rails
owner@owner-Z87X-UD3H:~$ gem install rails --debug -V NOTE: Debugging mode prints all exceptions even when rescued Exception `LoadError' at /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/resolv.rb:169 - LoadError HEAD https://api.rubygems.org/api/v1/dependencies Exception `OpenSSL::SSL::SSLErrorWaitReadable' at /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/openssl/buffering.rb:182 - read would block 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=rails Exception `OpenSSL::SSL::SSLErrorWaitReadable' at /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/openssl/buffering.rb:182 - read would block Exception `OpenSSL::SSL::SSLErrorWaitReadable' at /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/openssl/buffering.rb:182 - read would block Exception `OpenSSL::SSL::SSLErrorWaitReadable' at /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/openssl/buffering.rb:182 - read would block Exception `OpenSSL::SSL::SSLErrorWaitReadable' at /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/openssl/buffering.rb:182 - read would block Exception `OpenSSL::SSL::SSLErrorWaitReadable' at /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/openssl/buffering.rb:182 - read would block 200 OK Exception `Resolv::DNS::Config::NXDomain' at /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/resolv.rb:547 - _rubygems._tcp.api.rubygems.org Exception `Errno::ECONNREFUSED' at /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/net/http.rb:879 - Connection refused - connect(2) for "your-dns-needs-immediate-attention.network" port 443 Exception `Gem::RemoteFetcher::FetchError' at /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/remote_fetcher.rb:286 - Errno::ECONNREFUSED: Connection refused - connect(2) for "your-dns-needs-immediate-attention.network" port 443 (https://your-dns-needs-immediate-attention.network/quick/Marshal.4.8/rails-4.1.5.gemspec.rz) ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) Errno::ECONNREFUSED: Connection refused - connect(2) for "your-dns-needs-immediate-attention.network" port 443 (https://your-dns-needs-immediate-attention.network/quick/Marshal.4.8/rails-4.1.5.gemspec.rz) /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/remote_fetcher.rb:286:in `rescue in fetch_path' /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/remote_fetcher.rb:259:in `fetch_path' /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/source.rb:146:in `fetch_spec' /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/resolver/api_specification.rb:76:in `spec' /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/resolver/installer_set.rb:77:in `add_always_install' /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/dependency_installer.rb:461:in `resolve_dependencies' /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/commands/install_command.rb:238:in `install_gem' /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/commands/install_command.rb:299:in `block in install_gems' /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/commands/install_command.rb:295:in `each' /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/commands/install_command.rb:295:in `install_gems' /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/commands/install_command.rb:202:in `execute' /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/command.rb:307:in `invoke_with_build_args' /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/command_manager.rb:168:in `process_args' /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/command_manager.rb:138:in `run' /home/owner/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/gem_runner.rb:54:in `run' /home/owner/.rvm/rubies/ruby-2.1.2/bin/gem:21:in `<main>'
With the --local ( -l ) option, you would perform a local search through your installed gems. To install a gem, use gem install [gem] . Browsing installed gems is done with gem list . For more information about the gem command, see below or head to RubyGems' docs.
gem install bundler installs a gem(library) that will help you to manage your project dependencies. Then you have a project that contains a file called Gemfile , when you cd into that directory and enter bundle install it will install all gems needed for that project.
ActiveRecord is a gem that is part of Ruby on Rails. It is the ORM, i.e. the library that maps our objects to tables. In other words, it is the Ruby library that allows us to use Ruby classes in order to access our data stored in an RDBMS, like MySQL or PostgreSQL.
From the main menu, select Tools | Gem | Push Gem. In the Run tool window, specify your RubyGems credentials. Your gem will be published to RubyGems.org.
Like blasio pointed out. It seems like the Xfinity modems are setting up the search domain to home.network
and this is messing things up for the reasons he mentioned (essentially, home.network is now a valid domain name that the modems are trying to contact before making a connection).
I had the same problem and the modification on resolv.conf seem to do the trick, and that should probably be an accepted solution for linux environments. I had this problem while attempting this on a virtual machine running ubuntu, and my host(OSX Mavericks) was passing down the search home.network
like the modem is, so I wanted to see if I could find a solution that could be done at the host OS level because the same problem happened when I attempted gem install rails
on my OSX terminal.
If you go to the OSX network settings, under DNS you'll see the home.network
line under the Search Domains area. After some googling it seems that comcast recently changed this from http://hds1.ma.comcast.net'
. I changed it back, restarted and gave gem install rails
another shot, which worked with no problem.
Strange issue but this is a better solution that swapping modems or changing gem sources.
I had the same issue with Comcast xFinity and Compass.
Update for Windows 7 users:
Go to Control Panel > Network and Sharing Center Under "Active Networks" select "Connections: Local Area Connections" In the "Local Area Connection Status" dialogue box, click on "Properties" Double click the IPv4 item In the "Internet Proptocol Verion 4" icon or click the "Properties" button, then click "Advanced" In the DNS tab, just above the 2nd input box, click the "Append These DNS suffixes (in order)" radio button, then click "Add", enter "home.lan", then click OK until the dialogue closes. Many thanks to John Smith for the Vista fix and Somnambulent for Win 8.1 fix.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With