Replace the gem source

Source: Internet
Author: User

When installing the Gem package, it is usually not possible to install properly due to GFW.


Report the following similar error:

Gem::remotefetcher::fetcherror:errno::econnreset:connection Reset by Peer-ssl_connect (https://rubygems.org/gems/ Curses-1.0.1.gem) An error occurred while installing curses (1.0.1), and bundler cannot continue. Make sure that ' gem install curses-v ' 1.0.1 ' succeeds before bundling.


Hateful GFW, always at any time to create trouble for you. There is no way, then change the source bar.


View the currently used gem source

# Gem Sources-l


Delete the listed source, usually https://rubygems.org/


# Gem Sources-r https://rubygems.org/


After deletion, add a domestic source bar, so do not go gfw. It's only so (unless you have something to turn over the wall)


Add a gem source for Taobao


# Gem Sources-a https://ruby.taobao.org/


See if the gem source is updated with the Gem sources-l command.


Finally, update the cache


# Gem Sources-u


Supplemental Learning:

Gem Sources-h


It is also clear on the home page of Tabobao's gem to show you how to replace the solution. Can learn:

https://ruby.taobao.org/

This article is from the "RIP Notes" blog, please make sure to keep this source http://unixman.blog.51cto.com/10163040/1684977

Replace the gem source

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.