Local installation sass wrong issue resolved

March 23, 2016 Personal blog articles - move to segmentfault

Installation sass

ruby installation
because sass ruby depends on the environment, so make sure before loading sass installed ruby. Pilot official website to download a ruby

When installed, check the Add Ruby executables to your PATH this option, add the environment variable, or later use when compiling software will be prompted to find the ruby ​​environment

Then directly enter the command line

gem install sass

Press ENTER to confirm, wait for a period of time you will be prompted to install sass success. Recently more powerful because of the wall, if you did not install successfully, please refer to the following Taobao RubyGems image installation sass, if successful, is ignored.

Taobao RubyGems image installation sass
as domestic reasons for the network (you know), resulting in rubygems.org stored in Amazon S3 above resource files intermittent connection failures. At this time we can configure the source by gem sources command to remove the default https://rubygems.org source , and then add Taobao source https://ruby.taobao.org/ , and then view the source currently in use is lower which, if Taobao, then you can enter the command gem install sass sass to install, and can be found on common gem source command: common gem source

$ gem sources --remove https:<span class="comment">//rubygems.org/</span>
$ gem sources -a https:<span class="comment">//ruby.taobao.org/</span>
$ gem sources -l
*** CURRENT SOURCES ***
 
https:<span class="comment">//ruby.taobao.org</span>
# 请确保只有 ruby.taobao.org
$ gem install sass

Focus here:
it is more than the normal method of installation, for example, if you install an error about the error:

When performing gem sources -a when https://ruby.taobao.org/ given example:

Error fetching https://ruby.taobao.org/:
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: ce
rtificate verify failed (https://rubygems-china.oss-cn...
cs.4.8.gz)

This problem is embarrassing, found on the Internet a lot are not resolved, but now there is a solution to the problem as follows:

Replace: GEM Sources -add http://gems.ruby-china.org/

Note: It is http instead of https

Then install the gem install sass

The reason is unknown, but should be able to see the ruby
with the https protocol installation package, there was not any deal with the results of the program can not use https authentication problems leading to the source of the current view can only be installed http

Guess you like

Origin www.cnblogs.com/jlfw/p/11965135.html