• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ubuntu安装ruby,安装sass,安装compass

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

安装ruby

apt-get install ruby
apt-get install ruby-dev

也可以安装指定的版本

# 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

可以通过。

ruby -v 

查看版本。

安装sass

sass依赖ruby,而且版本要2.0及以上。

 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

安装成功。

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

测试使用

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中添加自动转换工具


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Ruby 读书笔记发布时间:2022-07-14
下一篇:
.NET下的又一个选择:Ruby发布时间:2022-07-14
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap