一直被sass的強大功能所吸引,可是在window上好像安裝ruby會有各類莫名的錯誤,因此想遷到linux上面,可是按照百度上進行以下步驟安裝的時候老是提示錯誤,因爲個人系統上有ruby,因此我直接運行以下命令:
gem install sass
可是出現以下的錯誤:
While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /var/lib/gems/2.1.0 directory.
按照字面意思應該就是權限問題了,因而我又進行下面的命令:
sudo gem install sass
而後又出現以下的錯誤:
While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://api.rubygems.org/gems/sass-3.4.18.gem)
百度以後,說是gem 在國內的鏡像不能用,慶幸淘寶改了其鏡像,步驟以下:
$ gem sources --remove https://rubygems.org/
$ gem sources -a https://ruby.taobao.org/
$ gem sources -l
*** CURRENT SOURCES ***
https://ruby.taobao.org
按照步驟進行就行,以後再進行以下命令:
sudo gem install sass
果真搞定
記錄一下這個過程
linux