当前位置:   article > 正文

如何在centos7上安装ruby和compass_yum install -y rh-ruby26

yum install -y rh-ruby26

踏得网迁移服务器(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

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/91592
推荐阅读
相关标签
  

闽ICP备14008679号