Total de visualizações de página

terça-feira, 3 de maio de 2016

Install Ruby 2.2


Install Ruby 2.2
2015/07/05
 
The version of Ruby in CentOS 7 repository is 2.0 but Install 2.2 with RPM package if you need.
[1]Install development packages.
[root@dlp ~]# 
yum -y groups install "Development Tools"
# install from EPEL

[root@dlp ~]# 
yum --enablerepo=epel -y install gdbm-devel libdb4-devel libffi-devel libyaml libyaml-devel ncurses-devel openssl-devel readline-devel tcl-devel
[2]Download Ruby source and build RPM from it. Make sute the latest one and Download it from the site below.
⇒ https://www.ruby-lang.org/
[root@dlp ~]# 
mkdir -p rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} 
# dowload source

[root@dlp ~]# 
wget http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.3.tar.gz -P rpmbuild/SOURCES 
# download SPEC file

[root@dlp ~]# 
wget https://raw.githubusercontent.com/tjinjin/automate-ruby-rpm/master/ruby22x.spec -P rpmbuild/SPECS
[root@dlp ~]# 
rpmbuild -bb rpmbuild/SPECS/ruby22x.spec
[root@dlp ~]# 
rpm -Uvh rpmbuild/RPMS/x86_64/ruby-2.2.3-1.el7.centos.x86_64.rpm 

Preparing...                          ################################# [100%]
Updating / installing...
   1:ruby-2.2.3-1.el7.centos          ################################# [100%]

[root@dlp ~]# 
ruby -v 

ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
[root@dlp ~]# 
gem -v 

2.4.5.1

Nenhum comentário:

Postar um comentário