CyberKeeda In Social Media

RUBY Installation on Centos with RVM

Install Required dependency mandatory Packages
Install all required packages for ruby installation 
# yum install gcc-c++ patch readline readline-devel zlib zlib-devel
# yum install libyaml-devel libffi-devel openssl-devel make
# yum install bzip2 autoconf automake libtool bison iconv-devel sqlite-devel
Install RVM
Install latest stable version of RVM
# curl -k https://rvm.io/mpapis.asc | gpg --import -
# curl -L get.rvm.io | bash -s stable
Setup rvm environment.
# source /etc/profile.d/rvm.sh
# rvm reload
Ensure RVM Dependencies
Now use following To verify all dependencies are properly installed.
# rvm requirements run

Checking requirements for centos.
Requirements installation successful.
Install Ruby 2.5.0
RVM is ready now, lets use it to install Ruby.
# rvm install 2.5.0
[Sample Output]
Searching for binary rubies, this might take some time.
No binary rubies available for: centos/7/x86_64/ruby-2.5.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for centos.
Requirements installation successful.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.5.0, this may take a while depending on your cpu(s)...
ruby-2.5.0 - #downloading ruby-2.5.0, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 12.7M  100 12.7M    0     0  33.5M      0 --:--:-- --:--:-- --:--:-- 33.6M
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.5.0 - #extracting ruby-2.5.0 to /usr/local/rvm/src/ruby-2.5.0....
ruby-2.5.0 - #configuring...................................................
ruby-2.5.0 - #post-configuration..
ruby-2.5.0 - #compiling.....................................................
ruby-2.5.0 - #installing............................
ruby-2.5.0 - #making binaries executable..
ruby-2.5.0 - #downloading rubygems-2.4.8
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  437k  100  437k    0     0  2367k      0 --:--:-- --:--:-- --:--:-- 2376k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.5.0 - #extracting rubygems-2.4.8....
ruby-2.5.0 - #removing old rubygems.........
ruby-2.5.0 - #installing rubygems-2.4.8......................
ruby-2.5.0 - #gemset created /usr/local/rvm/gems/ruby-2.5.0@global
ruby-2.5.0 - #importing gemset /usr/local/rvm/gemsets/global.gems...............................................
ruby-2.5.0 - #generating global wrappers........
ruby-2.5.0 - #gemset created /usr/local/rvm/gems/ruby-2.5.0
ruby-2.5.0 - #importing gemsetfile /usr/local/rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.5.0 - #generating default wrappers........
ruby-2.5.0 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.5.0 - #complete
Ruby was built without documentation, to build it run: rvm docs generate-ri
Set Current Installed Ruby to Default Ruby Version
Use rvm command to setup default ruby version.
# rvm use 2.5.0 --default

Using /usr/local/rvm/gems/ruby-2.5.0
Check Current Ruby Version.
Like other programmes you can also use -v or --version to check ruby version
# ruby --version

ruby 2.5.0p230 (2015-12-16 revision 53155) [x86_64-linux]

No comments:

Post a Comment

Designed By Kunal Saha