如何在centos7上安装ruby和compass

踏得网迁移服务器(CentOS5->CentOS7)时,遇到了一些麻烦,这里记录一下。

Compass是用来编译SCSS语法的,依赖于Ruby,虽然目前该项目可能已经不再活跃,但不能影响历史代码的应用。

yum install centos-release-scl-rh centos-release-scl

next install the right version 

yum --enablerepo=centos-sclo-rh  install rh-ruby26

then enable ruby2.6 in bash

scl enable rh-ruby26 bash

If you would like the change to be permanent (the change still persists after you log out and log back in)

you can edit your $HOME/.bashrc file to include the following line:

source scl_source enable rh-ruby26 

to verify if ruby 2.6 is installed properly or not:  

ruby --version
ruby 2.6.2p47 (2019-03-13 revision 67232)

Ensure you install the header files when you compile gem 

yum install http://mirror.centos.org/centos/7/sclo/x86_64/rh/rh-ruby26/rh-ruby26-ruby-devel-2.6.2-118.el7.x86_64.rpm

或者 yum --enablerepo=centos-sclo-rh-testing install rh-ruby26-ruby-devel

Finally

gem install compass

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值