ubuntu安裝ruby,安裝sass,安裝compass

安裝ruby

apt-get install ruby。
默認會安裝1.9的。
不是本身想要的。php

能夠進行下面的處理。css

# sudo apt-get install python-software-properties
# sudo apt-add-repository ppa:brightbox/ruby-ng
# sudo apt-get update
# sudo apt-get install ruby2.5 ruby2.5-dev

能夠經過。python

ruby -v

查看版本。json

安裝sass

sass依賴ruby,並且版本要2.0及以上。sass

sudo gem install sass
jiqing@ThinkPad:~$ sudo gem install sass
Fetching: rb-fsevent-0.10.3.gem (100%)
Successfully installed rb-fsevent-0.10.3
Fetching: ffi-1.9.23.gem (100%)
Building native extensions. This could take a while...
Successfully installed ffi-1.9.23
Fetching: rb-inotify-0.9.10.gem (100%)
Successfully installed rb-inotify-0.9.10
Fetching: sass-listen-4.0.0.gem (100%)
Successfully installed sass-listen-4.0.0
Fetching: sass-3.5.6.gem (100%)
Successfully installed sass-3.5.6
Parsing documentation for rb-fsevent-0.10.3
Installing ri documentation for rb-fsevent-0.10.3
Parsing documentation for ffi-1.9.23
Installing ri documentation for ffi-1.9.23
Parsing documentation for rb-inotify-0.9.10
Installing ri documentation for rb-inotify-0.9.10
Parsing documentation for sass-listen-4.0.0
Installing ri documentation for sass-listen-4.0.0
Parsing documentation for sass-3.5.6
Installing ri documentation for sass-3.5.6
Done installing documentation for rb-fsevent, ffi, rb-inotify, sass-listen, sass after 14 seconds
5 gems installed

安裝成功。ruby

jiqing@ThinkPad:~$ sass -v
Ruby Sass 3.5.6

測試使用phpstorm

sass main.scss main.css

它會生成一個main.css的文件。工具

安裝compass

sudo gem install compass
jiqing@ThinkPad:~$ sudo gem install compass
[sudo] password for jiqing: 
Fetching: sass-3.4.25.gem (100%)
Successfully installed sass-3.4.25
Fetching: multi_json-1.13.1.gem (100%)
Successfully installed multi_json-1.13.1
Fetching: compass-core-1.0.3.gem (100%)
Successfully installed compass-core-1.0.3
Fetching: compass-import-once-1.0.5.gem (100%)
Successfully installed compass-import-once-1.0.5
Fetching: chunky_png-1.3.10.gem (100%)
Successfully installed chunky_png-1.3.10
Fetching: compass-1.0.3.gem (100%)
    Compass is charityware. If you love it, please donate on our behalf at http://umdf.org/compass Thanks!
Successfully installed compass-1.0.3
Parsing documentation for sass-3.4.25
Installing ri documentation for sass-3.4.25
Parsing documentation for multi_json-1.13.1
Installing ri documentation for multi_json-1.13.1
Parsing documentation for compass-core-1.0.3
Installing ri documentation for compass-core-1.0.3
Parsing documentation for compass-import-once-1.0.5
Installing ri documentation for compass-import-once-1.0.5
Parsing documentation for chunky_png-1.3.10
Installing ri documentation for chunky_png-1.3.10
Parsing documentation for compass-1.0.3
Installing ri documentation for compass-1.0.3
Done installing documentation for sass, multi_json, compass-core, compass-import-once, chunky_png, compass after 5 seconds
6 gems installed
jiqing@ThinkPad:~$ compass -v
Compass 1.0.3 (Polaris)
Copyright (c) 2008-2018 Chris Eppstein
Released under the MIT License.
Compass is charityware.
Please make a tax deductable donation for a worthy cause: http://umdf.org/compass

phpstorm中添加自動轉換工具

相關文章
相關標籤/搜索