Home >Web Front-end >HTML Tutorial >sass installation record_html/css_WEB-ITnose
I have installed sass once before, but unfortunately I didn’t use it. Now I changed my computer and reinstalled it. I also searched for some information online and finally installed it successfully. I will just keep it as a record for the next installation.
First Go to the official website to download the latest version of ruby: http://rubyinstaller.org/downloads The latest stable version is 2.2.2.
After the download is completed, it will be installed. However, remember to check the option Add Ruby executables to your PATH and add environment variables. Otherwise, when you use the compilation software in the future, you will be prompted that ruby cannot be found. environment.
Then Ruby was successfully installed as expected. Then it’s time to install sass.
1. In the start menu, find the ruby we just installed and open Start Command Prompt with Ruby.
2. Enter the command gem install sass. (⊙o⊙)…The time has come to look at character. At this time, it usually fails. . .
3. Because foreign countries generally have strong walls. Therefore, failure is normal. In this case, it is recommended to use mirror installation. I just found a Taobao image and installed it successfully.
At this time we need to use the gem sources command to configure the source. The steps are as follows:
① First check the existing sources: gem sources -l
② Delete the original sources: gem sources --remove https://rubygems.org/
③Add Taobao mirror source: gem sources -a https://ruby.taobao.org/
④Check again to confirm that there is only one Taobao source: gem sources -l
⑤Run again Install sass, gem install sass.
If there is no problem with your character, you will usually be successful. If you still have problems, go to Du Niang - -! Then start your sass journey.